Overriding HTTP redirects?
This is an open discussion with 2 replies, filed under Troubleshooting.
Search
Do you need to set the [L]
flag so that it’s the last rule applied?
Be aware: in .htaccess the [L]
flag causes mod_rewrite to run all instructions again. Although together with a [R]
, it doesn’t. :-D
Create an account or sign in to comment.
I am running Symphony in a site’s root directory, and I need to create a redirect that strips the name of a folder from URLs. However, the htaccess rules for Symphony seem to intercept the redirect at some point, and I don’t know enough to figure out where.
Concretely, I’d like to strip the
/blog
directory from any URLs.For example,
http://example.tld/blog/one.html
would 301 redirect tohttp://example.tld/one.html
.The syntax I’d normally use is:
But when added to the htaccess file, that line redirects to
http://example.tld/?page=one.html