Post by rize » Tue Apr 17, 2012 10:47 pm

How do i force www on opencart?

i tried this but it didn't work:

Code: Select all

# REDIRECT NON-WWW
RewriteCond %{HTTP_HOST} ^yourdomain.com$
RewriteRule ^/?$ "http\:\/\/www\.yourdomain\.com" [R=301,L]
note: i did replace yourdomain with my domain, just to avoid confusion

New member

Posts

Joined
Fri Jul 15, 2011 11:29 am

Post by Tcalp » Tue Apr 17, 2012 11:43 pm

add this :

RewriteCond %{HTTP_HOST} !^www\.jhuskisson\.com [NC]
RewriteRule ^(.*)$ [R=301,L]

make sure it comes direcly after the re-write engine on statement ... (haven't tried this myself mind you)

Increase Page Speed (#1 rated commercial extension on OpenCart Marketplace)
15in1 Essential Extensions Value Pack Premium Customer Testimonials Reward Points Extended Admin Security Lockdown Suite

Image
irc.freenode.net #opencart


User avatar
Active Member

Posts

Joined
Wed Jul 06, 2011 1:49 pm

Post by rize » Wed Apr 18, 2012 9:12 am

thanks but that didnt work, i get a 500 internal server error

New member

Posts

Joined
Fri Jul 15, 2011 11:29 am
Who is online

Users browsing this forum: Google [Bot] and 23 guests