开发者

htaccess hide subdirectory with RewriteBase

开发者 https://www.devze.com 2023-03-28 17:12 出处:网络
From http://www.example.com/eblasts/_ire To http://www.example.com/eblasts I have this, but doesn\'t work...

From http://www.example.com/eblasts/_ire

To http://www.example.com/eblasts

I have this, but doesn't work...

RewriteBase /
RewriteCond %{REQUEST_URI} !^开发者_StackOverflow社区/eblasts/_ire
RewriteRule ^(.*)$ eblasts/$1 [L]

What did I mess up on?


your rewriterule rewrite http://www.example.com/eblasts/_ire to
http://www.example.com/eblasts/eblasts/_ire

RewriteBase /
RewriteCond %{REQUEST_URI} !^/eblasts/_ire
RewriteRule ^(.*)$ eblasts [L]

Update:

RewriteRule ^home.html$ _ire/home.html
0

精彩评论

暂无评论...
验证码 换一张
取 消