admin管理员组文章数量:1420659
I have a WordPress site that is installed in a directory called cms.
I will be using a pure HTML page as my Home page, the inner pages will be using WordPress.
Let's call the website mysite
visiting mysite needs to show my plain html page.
The help I need is to hide the cms folder in the URL.
I have the following .htaccess file in my root
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?mysite$
RewriteCond %{REQUEST_URI} !^/cms/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /cms/$1
</IfModule>
And this .htaccess in side the cms directory:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /cms/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /cms/index.php [L]
</IfModule>
I don't think I need to have both but that is the only way I've gotten the pages to show up without an error.
For example lets say I have a page called MyPage
With how I have things set now it is accessible at:
mysite/MyPage AND mysite/cms/MyPage
I need it to only be accessible at mysite/MyPage
While maintaining the ability to serve the static HTML page at mysite
Any advice is appreciated!
本文标签: url rewritingHelp with htaccess setup to hide WordPress Directory
版权声明:本文标题:url rewriting - Help with .htaccess setup to hide WordPress Directory 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745334590a2653979.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论