Jump to content

Redirect in htaccess give me double slash after domain and 404


qrczak

Recommended Posts

Presta make autoredirect from (no SSL with www to SSL with www)

http://www.domain.com/* to https://www.domain.com/* //and it's OK

and from (SSL without www to SSL with www)

https://domain.com/* to https://www.domain.com/* //and it's OK

and from (no SSL without www to SSL with www)

http://domain.com/* I expect the same result like two above examples - https://www.domain.com/*

but it isn't 

example:

http://mydomain.com/category/123-product-name.html 
redirect me to
https://www.mydomain.com//category/123-product-name.html

 
it's give me 404 page because there are double slashes after "mydomain.com"
 
even if I put after (below) line "# ~~end~~ Do not remove this comment [...]" my own htaccess rules like this:
 

RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^ https://www.mydomain.com%{REQUEST_URI} [L,R=301]

 
Still the same. And this piece of code is right, even on .htaccess test tool http://htaccess.mwl.be/ everything is OK - see https://www.dropbox.com/s/ns4238dmvwupinu/htaccess_Tester.png?dl=0
 
Maybe I'm wrong but I think the redirect rules are right so maybe something wrong on Presta side?

Edited by qrczak (see edit history)
Link to comment
Share on other sites

  • 5 years later...
  • 3 weeks later...

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...