I'm trying to redirect a dynamic page to a dir, example:
url.com/index.php?page=download
to
url.com/download
The rule is very simple:
RewriteRule ^download$ /index.php?page=download
FULL .HTACCESS
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.url.com$
RewriteRule ^(.*) http://url.com/$1 [R=301,L]
Redirect 301 /index.php?page=download http://url.com/download
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]
RewriteRule ^download$ /index.php?page=download
The problem is that I already have a directory named "download" and it's returning me a "403 Forbidden Error". I have noticed that renaming the directory to anything different than the name (download) the rule is using will work.
So, my question is: how can I have my url rewritten the way I need and keep the directory?
-- EDIT --
My server, by default, protects every directory with a "403 Forbbiden Error". I believe this is the reason why it's not working, but I'm not sure. Is it a conflict indeed? What is happening?
See Question&Answers more detail:os