Post by vanda » Fri Feb 03, 2017 10:42 am

1. when i Install opencart is "http://domain.com" but after change with "www" is error many icons why?
Ex: "http://domain.com" to "http://www.domain.com"

2. I want to redirect when i typing "http://www.domain.com" to "http://domain.com". How to do?

3. I type URL for testing with multi "//" is run normal why? Ex: http://domain.com//////aabc
Notice: aabc is product name.

I mean that when i typ http://domain.com//aabc. it redirect to http://domain.com/aabc if it's found.
but it's not found it show "404" page.

Please look at the picture

Attachments

Error icon after apply www.png

Error icon don't show after type URL with "www.domain.com" - Error icon after apply www.png (2.41 MiB) Viewed 743 times

with multi command is normal why.png

problem with multi "//" - with multi command is normal why.png (1.06 MiB) Viewed 743 times


Newbie

Posts

Joined
Sat Nov 19, 2016 11:46 pm

Post by ashwani_multi » Fri Feb 03, 2017 3:01 pm

which url you want keep

http://yoursite.com
or
http://www.yoursite.com

let if you want keep url with www.

then open your config file admin and front

Front config.php

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.yoursite.com/');

// HTTPS
define('HTTPS_SERVER', https://www.yoursite.com/');
admin config.php

Code: Select all

// HTTP
define('HTTP_SERVER',' https://www.yoursite.com/admin/');
define('HTTP_CATALOG', 'https://www.yoursite.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yoursite.com/admin/');
define('HTTPS_CATALOG', 'https://www.yoursite.com/');
after setup config.php you need setup .httaccess file

after this code RewriteRule sitemap.xml /index.php?route=feed/google_sitemap

Code: Select all

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

Opencart Quick checkout
View All modules
Any opencart issue contact me at support@opencartextensions.in

Thank you


User avatar
New member

Posts

Joined
Tue Dec 09, 2014 2:40 pm
Location - Ludhiana,Punjab,India

Post by vanda » Fri Feb 03, 2017 10:13 pm

ashwani_multi wrote:which url you want keep

http://yoursite.com
or
http://www.yoursite.com

let if you want keep url with www.

then open your config file admin and front

Front config.php

Code: Select all

// HTTP
define('HTTP_SERVER', 'http://www.yoursite.com/');

// HTTPS
define('HTTPS_SERVER', https://www.yoursite.com/');
admin config.php

Code: Select all

// HTTP
define('HTTP_SERVER',' https://www.yoursite.com/admin/');
define('HTTP_CATALOG', 'https://www.yoursite.com/');

// HTTPS
define('HTTPS_SERVER', 'https://www.yoursite.com/admin/');
define('HTTPS_CATALOG', 'https://www.yoursite.com/');
after setup config.php you need setup .httaccess file

after this code RewriteRule sitemap.xml /index.php?route=feed/google_sitemap

Code: Select all

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

I don't understand about this code.
my objective, when write on URL browser "www.domain.com" it redirect to "domain.com" because if i typing "www.domain.com" many icons error so if i redirect to "domain.com" is better.

or

I write on URL browser "domain.com" redirect to "www.domain.com".

Notice: I understand about config.php and in admin config.php but the code ".httaccess" i don't understand.
I try finding but not found. I mean that how to completed on ".httacess" if you can guide me step by step is the best for me.


RewriteBase /
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]

How to do?

Newbie

Posts

Joined
Sat Nov 19, 2016 11:46 pm
Who is online

Users browsing this forum: No registered users and 113 guests