Post by ophir » Wed Aug 21, 2013 3:26 pm

Hello, I have lunched my site and discovered a problem after lunching, if I put www before my site address it works normally and I can add products to my cart, but if I enter the domain without www it doesn't add any products to my site!!!! I searched the forum and found this answer but didn't know how o do it!!!
http://forum.opencart.com/viewtopic.php ... 6&p=259036

Please help ASAP as I starting to take traffic and this is a problem, my site link www.japublishers.com/store

Thanks

Newbie

Posts

Joined
Wed Jul 17, 2013 6:42 pm

Post by ogun » Wed Aug 21, 2013 4:30 pm

This will explain the issue, and tell you what to put in your htaccess file:

http://www.thesitewizard.com/apache/red ... main.shtml

You'll need something like one of the following:
(These are *completely untested* examples,they are just to give you an idea of what to look for.)
Redirect anything that isn't www .japublishers.com to www .japublishers.com.

Code: Select all

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.japublishers\.com$ [NC]
RewriteRule ^(.*)$ http://www.japublishers.com/$1 [R=301,L]
Redirect for missing www.

Code: Select all

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^japublishers\.com$ [NC]
RewriteRule ^(.*)$ http://www.japublishers.com/$1 [R=301,L]

Active Member

Posts

Joined
Tue Aug 14, 2007 6:04 am

Post by ophir » Wed Aug 21, 2013 4:36 pm

Thanks but my store link is www.japublishers.com/store . Will your code keep /store?
Thanks

Newbie

Posts

Joined
Wed Jul 17, 2013 6:42 pm

Post by ogun » Wed Aug 21, 2013 4:57 pm

No reason why it shouldn't, it only affects the main part of the address.

...but you really should read the article instead of copying and pasting something that I copied and pasted from Google - then you can copy and paste from that with confidence :)

Active Member

Posts

Joined
Tue Aug 14, 2007 6:04 am

Post by ophir » Thu Aug 22, 2013 3:47 am

Didn't work it removes /store
I have added RewriteBase /store/
but no use??? Please help

Newbie

Posts

Joined
Wed Jul 17, 2013 6:42 pm

Post by butte » Thu Aug 22, 2013 4:04 am

In Firefox 22 (A) at http://www.japublishers.com/ I am seeing what appears to be a log-in screen, (B) at http://www.japublishers.com/shop/ I am seeing OC, and (C) upon adding admin/ I am seeing the 1.5.5.1 log-in.

(1) In .htaccess you are evidently already telling it that the shore is in /store/, because it found the store.

(2) You can address your store as above and land it in that directory, /store/.

(3) You can have the log-in at (A) hand off to OC at (B). Presumably you want people to land at (A) for a reason, although maybe you still want the public to reach OC at (B) anyway.

Do you want public access BYPASSING (A) INTO (B)?

(4) You can send store traffic to (B) by forwarding to that directory, /store/, but a DNS A record would send traffic to the domain, just / where (A) lands, unless that traffic is sent along by .htaccess to somewhere else, such as (B).

Do you want ONLY (A) to give access to (B)?

Guru Member

Posts

Joined
Wed Mar 20, 2013 6:58 am
Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 22 guests