更新时间:2023-09-26 22:53:58
这应该改变 http://www.mysite.com/subfolder/
到 http://www.mysite.com/
RewriteEngine叙述上
重写规则^ /子目录/(.*)$ http://www.mysite.com/$1 [L,R = 301]
I've moved WordPress into it's own directory as per the instruction found on the WordPress support site.
I've got his working fine but the URL now shows http://www.example.com/subfolder/
but I want it to show without the /subfolder/
I can't seem to get the htaccess to remove the /subfolder/
Here's my current htaccess code
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?mysite.com$
RewriteRule ^(/)?$ subfolder [L]
This should change http://www.mysite.com/subfolder/
to http://www.mysite.com/
RewriteEngine On
RewriteRule ^/subfolder/(.*)$ http://www.mysite.com/$1 [L,R=301]