Post by Motobot » Fri Mar 25, 2016 1:44 am

Hello Guys,

Im using the lastest version of opencart 2.2.0.0 and i really read all the post already made but couldn't fix the issue.. My non www won't redirect to the www.domaine.com :-\

This is how my .htaccess look like ( i can post the full file if needed )
# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
# If your opencart installation does not run on the main web folder make sure you folder it does run in ie. / becomes /shop/

RewriteBase /
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L]
RewriteRule ^googlebase.xml$ index.php?route=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]
Thank you for the help !!!
Sincerely,

Motobot O0

Newbie

Posts

Joined
Fri Mar 25, 2016 1:39 am

Post by abxweb » Fri Mar 25, 2016 3:34 am

Have you tried pasting your custom code below?

Code: Select all

RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Check my FREE extension - Frontend Admin Toolbar
http://www.opencart.com/index.php?route ... n_id=26059

For any inquiry or questions contact me at: abxweb[at]outlook[dot]com


User avatar
New member

Posts

Joined
Fri Mar 04, 2016 5:47 pm
Location - Serbia

Post by Motobot » Fri Mar 25, 2016 12:40 pm

Hello,

Yes i did already and nothing happen :( .. i really dont understand.
The code was actually here already (come with the new update of opencart) but nothing work and when i open my website without the www its impossible for anyone to add to cart !!

EDIT : Ok found out the problem... Open cart give you the htaccess like this ( .htaccess.txt ) i could have try millions things :/ ... just remove the .txt and VOILA ! :crazy:

So the files should just look like that .htaccess and everything work just fine now.

Thank for the help !

Newbie

Posts

Joined
Fri Mar 25, 2016 1:39 am

Post by OSWorX » Fri Mar 25, 2016 4:52 pm

Motobot wrote:EDIT : Ok found out the problem... Open cart give you the htaccess like this ( .htaccess.txt ) i could have try millions things :/ ... just remove the .txt and VOILA ! :crazy:

So the files should just look like that .htaccess and everything work just fine now.
In our first post you wrote how your .htaccess looks.
But correct was that you have edited the file named .htaccess.txt

Now you tell us that you have basically no glue what you are doing ... and expect that we should help you?
Fine that you have found that you are the bug himself.

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Administrator

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria
Who is online

Users browsing this forum: Baidu [Spider], Majestic-12 [Bot] and 84 guests