Link to home
Start Free TrialLog in
Avatar of altariamx2003
altariamx2003Flag for Mexico

asked on

rewriterule to activate ssl certificate and URL Canonicalization

Hi guys I have this rules in my htaccess to enabled my ssl and redirect all request from https://myserver.com to https://www.myserver.com, i wanna know if are ok or do i need to remove a line or add someone

RewriteCond %{HTTP_HOST} myserver\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.myserver.com/$1 [R,L]
RewriteCond %{HTTP_HOST} !^www.myserver.com$ [NC]
RewriteRule ^(.*)$ https://www.myserver.com/$1 [L,R=301]

I hope you can give an advice about it

Thx in advance
ASKER CERTIFIED SOLUTION
Avatar of altariamx2003
altariamx2003
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of altariamx2003

ASKER

please close this question I found the solution by myself