Hi All,
I have a little problem, my site had been installed using non-www url and i want to redirect all the customers that type www.mysite.com to the non-www address, in this exemple mysite.com. I searched the code on forum or internet, but i found only the code from non-www to www. If is possible please help me with the code, the site is ardentis.ro. Also could you please tell me if i can move the site from non-www to www after the installation? Thank you in advance for your support. Bellow we will find my htaccess code:
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Require all denied
## For apache 2.2 and older, replace "Require all denied" with these two lines :
# Order deny,allow
# Deny from all
</FilesMatch>
# SEO URL Settings
RewriteEngine On
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\. [NC]
RewriteRule ^(.*)$ http://yoursite.com/$1 [R=301,L]
RewriteRule ^sitemap.xml$ index.php?route=extension/feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=extension/feed/google_base [L]
RewriteRule ^system/download/(.*) index.php?route=error/not_found [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css)
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
I have edited your code above to redirect www to non-www
Please edit the domain name I put to suit your own.
Please edit the domain name I put to suit your own.
Oh, god! Just google for it!!! Tons and tons of solutions available.michalfranek wrote: ↑Sun Mar 24, 2019 2:40 amHi, I have same problem with my web can anybody help me with this? i am desperate
Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com
Who is online
Users browsing this forum: Amazon [Bot] and 8 guests