I can't seem to get my 301 redirect working, mod_alias is enabled along with mod_rewrite.
My rewrites work fine, but the 301s do not work. Basically what I am trying to do is setup "clean" URLs from dynamic php pages, which works fine...
The other part for each of these dynamic pages, I would like them to redirect to the right "clean" url.
Here is my .htaccess
#
# Options below ensure that all traffic is directed to www.mydomain
#
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^mydomain.com
RewriteRule (.*) http://www.mydomain.com/$1 [R=301,L]
RewriteRule ^index.php$ http://www.mydomain.com/ [R=301,L]
#
# URL Rewrites
#
RewriteRule videos page.php?id=1 [L]
#
# Custom redirects from OLD URLs
#
redirect 301 /page.php?id=1 /videos
Trying to achieve...
mydomain.com/videos
(this works - redirect does not)
If someone visits the dynamic page (page.php?id=1) they're automatically redirected to the clean URL.
mydomain.com/page.php?id=1 -> mydomain.com/videos
I tried using R=301 in the RewriteRule but a fatal error occurs. So that's why I created the redirect 301, but it just does not work period.