从使用Word preSS网址htaccess的删除子文件夹 [英] Remove subfolder from WordPress URL using htaccess
本文介绍了从使用Word preSS网址htaccess的删除子文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我搬到字preSS到它自己的目录按上的字preSS支持网站上找到的指令。
我有自己的工作正常,但现在的URL显示 http://www.example.com/subfolder/
但我想它没有<$显示C $ C> /子文件夹/
我似乎无法获得htaccess的删除 /子文件夹/
下面是我目前的htaccess code
RewriteEngine叙述上
的RewriteCond%{HTTP_HOST} ^(WWW)?mysite.com $
重写规则^(/)?$子文件夹[L]
解决方案
这应该改变 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]
这篇关于从使用Word preSS网址htaccess的删除子文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文