I want to rewrite all URLs of the form:
http://www.site.com/push20/dir1/dir2/afile.html
to
http://www.开发者_运维知识库site.com/dir1/dir2/afile.html
I.e. lose the push20
bit
I've tried with:
RewriteEngine On
RewriteRule ^push20/(.*) /$1 [R]
but its not happening.
Any suggestion?
Won't you need a leading /
before push20
?
i.e:
RewriteRule ^/push20/(.*) /$1 [R]
Unless I'm missing something, you can do this with a standard Redirect directive, something along these lines:
Redirect /push20 /
That should redirect everything under /push20 to the root of your site -- basically it strips out push20 and redirects.
精彩评论