Jump to content

[SOLVED] htaccess questions - rewrite & max redirects ?


Recommended Posts

Hello,

 

I am trying to optimize my htaccess file, and notice on a website on this topic that the author recommends putting this code in the top of the file to avoid a possible infinite loop:

 

Options +FollowSymlinks
RewriteEngine on
RewriteOptions MaxRedirects=10

 

Should I also consider using this in the context of Prestashop 1.4.6.2 and using friendly URLs?

 

Also, is there a better way to write the code below? It seems awfully long, and I would like to clean it, but don't know how to write it.

 

redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_01.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_02.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_03.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_04.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_05.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_06.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_07.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_08.html /6-gothic-necklaces
redirect 301 /contents/en-us/d356_gothic-shop-pendants-necklaces_09.html /6-gothic-necklaces

 

Help would be much appreciated! Thanks in advance!

 

Dan

 

SOLUTION:

RewriteRule ^some-string http://www.domain.com/index.php/blog/target [R]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...