url rewriting - Help with .htaccess setup to hide WordPress Directory

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, th

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!

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745334591a4623044.html

相关推荐

  • url rewriting - Help with .htaccess setup to hide WordPress Directory

    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, th

    7小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信