Post by ssswisss » Sun Jun 26, 2016 10:50 pm

hi to all

i tested many open cart demo 2.2.x on themeforest.

and i found this :

if i write the shop address : http://test.com (without www form) , add to cart button work. ist OKEY.

but with www. form add to cart button doenst work. then i see erorr Windows.

please check it. and what is it? how can i solve?

on all demo and on many different server. i think this is not because of server..

thnaks for your info
Last edited by i2Paq on Mon Jun 27, 2016 2:26 pm, edited 1 time in total.
Reason: Title adjusted

Newbie

Posts

Joined
Thu Feb 06, 2014 6:44 am

Post by straightlight » Sun Jun 26, 2016 11:00 pm

Removed first solution: User confirms not working for this topic.

A secondary solution: http://www.opencartaz.com/opencart/150- ... utton.html which leads to this post: http://forum.opencart.com/viewtopic.php ... 05#p202005
Last edited by straightlight on Sun Jun 26, 2016 11:30 pm, edited 1 time in total.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ssswisss » Sun Jun 26, 2016 11:29 pm

thanks for your info.
1. solution doenst work by me. i testet now.
no Redirect with following code 8 i changed sure with my address..

RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]


i will try now second solutions. then i report here

Newbie

Posts

Joined
Thu Feb 06, 2014 6:44 am

Post by straightlight » Sun Jun 26, 2016 11:31 pm

ssswisss wrote:thanks for your info.
1. solution doenst work by me. i testet now.
no Redirect with following code 8 i changed sure with my address..

RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule (.*) http://example.com/$1 [R=301,L]


i will try now second solutions. then i report here
No problem. First solution removed. However, ensure to reboot your server after making the .htaccess change. Otherwise, no effect will be reflected.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ssswisss » Sun Jun 26, 2016 11:36 pm

...
Last edited by ssswisss on Sun Jun 26, 2016 11:49 pm, edited 1 time in total.

Newbie

Posts

Joined
Thu Feb 06, 2014 6:44 am

Post by ssswisss » Sun Jun 26, 2016 11:48 pm

i dont understand second option with following codealso doenst work

RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC]

Newbie

Posts

Joined
Thu Feb 06, 2014 6:44 am

Post by straightlight » Mon Jun 27, 2016 12:06 am

ssswisss wrote:i dont understand second option with following codealso doenst work

RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,NC]
Did you restarted the server after the changes made?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ssswisss » Mon Jun 27, 2016 12:07 am

SORRRYYYYYYY. I DID NOW

on my open cart directory should i rename htaccess.txt to .htaccess

then following code is working :

RewriteCond %{HTTP_HOST} ^www\.test\.com [NC]
RewriteRule ^(.*)$ http://test.com/$1 [L,R=301]

Newbie

Posts

Joined
Thu Feb 06, 2014 6:44 am

Post by straightlight » Mon Jun 27, 2016 12:10 am

ssswisss wrote:SORRRYYYYYYY. I DID NOW

on my open cart directory should i rename htaccess.txt to .htaccess

then following code is working :

RewriteCond %{HTTP_HOST} ^www\.test\.com [NC]
RewriteRule ^(.*)$ http://test.com/$1 [L,R=301]
Yes, the file has to be renamed before you reboot the server.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by ssswisss » Mon Jun 27, 2016 12:26 am

i didnt reboot my server, i added code and renamed then worked automaticly..

thanks for your help and info

Newbie

Posts

Joined
Thu Feb 06, 2014 6:44 am

Post by straightlight » Mon Jun 27, 2016 12:33 am

ssswisss wrote:i didnt reboot my server, i added code and renamed then worked automaticly..

thanks for your help and info
Great, problem solved. :)

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: No registered users and 7 guests