dhurley Posted October 2, 2013 Share Posted October 2, 2013 Hello, Simple problem. I have built a rewrite that redirects all traffic from one directory to another: RewriteCond %{HTTP_HOST} ^mydomain.com$ RewriteRule ^size-charts/(.*)$ modules/mysizecharts/$1 [L] This works fine, and I have tested it many times. The problem is that it will only work if I put it up in the rewrites section, where Presta does all of it's rewriting. If I put it down it the "users" area, below this: # ~~end~~ Do not remove this comment, Prestashop will keep ... It does not work. But if I put it in the section where it does work it gets overwritten. Mod_rewrite is enabled and pretty urls work on the rest of the server. I should be able to use Rewrites and not have them overwritten. Am I doing something wrong, or did I find a bug? Thanks for any help! Link to comment Share on other sites More sharing options...
El Patron Posted October 3, 2013 Share Posted October 3, 2013 you would need to enable RewritEngine and typcially it's good form to check if mod_rewrite is loaded. <IfModule mod_rewrite.c> RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.com$ RewriteRule ^size-charts/(.*)$ modules/mysizecharts/$1 [L] </IfModule> Link to comment Share on other sites More sharing options...
Burhan BVK Posted October 3, 2013 Share Posted October 3, 2013 There is also an area at the beginning of the .htaccess file where you can put your custom redirects. # ~~start~~ Do not remove this comment, Prestashop will keep automatically the code outside this comment when .htaccess will be generated again Link to comment Share on other sites More sharing options...
El Patron Posted October 3, 2013 Share Posted October 3, 2013 also see this tip http://www.prestashop.com/forums/topic/2131[spam-filter]tip-15-and-custom-htaccess/ Link to comment Share on other sites More sharing options...
dhurley Posted October 3, 2013 Author Share Posted October 3, 2013 Looks like it works the way I want it to if I put the code at the top. Should have tried that first. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now