Reputation: 7855
I have the following URL:
www.domain.com/test/blog/index.html
I'd like apache to always rewrite the url so that "test" will be removed, resulting in:
www.domain.com/blog/index.html
What's the best way to do this?
Upvotes: 1
Views: 1144
Reputation: 396
This should do it nicely
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !(.*)test
RewriteRule ^(.*)$ test/$1 [L]
This will remove the subdirectory from the url as you have specified; It would seem any other problems you are experiencing would be in respect to something else in the .htaccess
file messing up the SymLinks.
I would suggest looking at the Apache error log to pin point exactly what the error is.
Hope this helps.
Upvotes: 2