Why redirect keeps changing address bar
Here is code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/rt/
RewriteRule ^(.*)$ /rt/$1 [L]
</IfModule>
There is no [R], but it keeps changing address bar location. It set redirect 302...
I need to change root folder to /rt/ folder, but without changing location in address bar. I can't use anything beside .htaccess file...
I want users when visit: http://domain.com/index.php
see
http://domain.com/index.php
but open http://domain.com/开发者_Python百科rt/index.php
This index.php is example file, I need this working for every file... Without changing location in browser address bar...
How about just using Alias
?
Alias / /rt
If not, make sure you have mod_proxy enabled, and try this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/rt/
RewriteRule ^(.*)$ /rt/$1 [PL]
</IfModule>
精彩评论