Jump to content

Custom .htaccess rewrites not working (bug maybe)


dhurley
 Share

Recommended Posts

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!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More