0
我一直在寻找这里的awnsers - 但我不能让它工作.. 我得到了这个网站的子文件夹(与WordPress的,如果这是一个问题..)我想 重定向到一个“假子域”使用htaccess。 当前的代码是:使用.htaccess将WP子文件夹重定向到子域名
AddDefaultCharset utf-8
DirectoryIndex index.php index.html index.htm
Options All -Indexes
ErrorDocument 404 /404.html
ErrorDocument 403 /404.html
RewriteEngine On
RewriteCond %{HTTP_HOST} ^MYDOMAINNAME.se
RewriteRule (.*) http://www.MYDOMAINNAME.se/$1 [R=301,L]
RewriteCond %{REQUEST_URI} !\.(png|jpg|jpeg|gif)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*)$ index.php/$1 [QSA]
我刚把这个贴在我的htaccess文件的底部。它是否需要位于某个文件内部的某个特定位置 ,或整个代码是否错误?
谢谢。
仍然无法得到它的工作.. drats! –
在WP永久链接设置中,您还需要提供相同的主机名称,即www。 MYDOMAINNAME.se' – anubhava