.htaccess 301 redirect
Hello I have a question for anyone that can answer it. I need to redirect a page on my site that no longer existed.
I need example.com/freebies.php to redirect to example.com/freebies
The problem is when I use a regular redirect it creates an infinite loop
I.E. Redirect 301 /freebies.php /freebies
Thanks in advance
You will have to write the 301 redirect code in your .htaccess file and have a try.
First, WELCOME to SitePoint's Apache forum!
I really see no problem with your mod_alias statement (except that I would have added a trailing / to the redirect).
I'd actually try TWHD's suggestion, though, but only because I'm far more familiar with mod_rewrite than I am with the nuances of mod_alias.
It says the same thing as your mod_alias Redirect statement but mod_rewrite has to start the regex engine which is a waste of time on such a simple redirect.
RewriteRule ^freebies\.php$ freebies/ [R=301,L]