.htaccess help, replacing URI segment
I have a URL that looks like this...
http://www.domain/a/var
I am hoping it would be possible to rewrite the URL using .htaccess so that /a/
would be replaced by /b/
.
Is开发者_如何学编程 that possible, and if so, how?
RewriteEngine On
RewriteRule ^a/(.*) /b/$1
This should do that you need
RewriteEngine on
RewriteRule ^/a/(.*) /b/$1
Note: You'll need to add [PT] or similar if you need mod_alias or mod_index or similar to work using the new path.
精彩评论