Forum Moderators: phranque
Here is the code I had before:
Dynamic Url: www.example.com/products_form.php?action=24
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /products_form\.php\?action=(24)\ HTTP/
RewriteRule ^products_form\.php$ http://www.example.com/oily-skin-products/skin-cream/? [R=301,L]
Now basic 301 redirect code like below will not work:
Redirect 301 /example.php http://www.example.com/example/
I think the reason this is occurring is because the developer is using variables to call all of the links.
For example:
<?php echo $DiscoverLink[0];?>
<?php echo $ProductLink[0];?>
I'm pretty sure this is what is causing the problem.
Any ideas?
Thanks for the help.
Brandon
Now basic 301 redirect code like below will not work:
Redirect 301 /example.php http://www.example.com/example/
That sounds like a fundamental server configuration problem. Without knowing what the other guy did (or could have done) to the server, it's pretty hard to even guess, here.
However, the 'basic' redirect above may have a problem: If example.php is defined as the DirectoryIndex file for the directory /example/, and if that rule is installed in an .htaccess file in the /example/ subdirectory, then that rule will create an infinite loop. In order to prevent looping, you'll have to use mod_rewrite and check THE_REQUEST if you want to 'change' requests for "/xyz/example.php" into requests for "/xyz/"
Jim