Post by madmaximus85 » Tue May 25, 2021 8:37 pm

Hello, i have main website example website.com and i need to redirect it to www.website.com (canonical),
but if i do that in config file (setup www.website.com) : my subdomains goes
en.website.com -> www.en.webiste.com


if i setup in config (setup website.com) my pages will redirect to non-canonical https://website.com
but subdomains will be ok (en.website.com)

If i put in htaccess rule
RewriteCond %{HTTP_HOST} ^website.com$ [NC]
RewriteRule (.*) https://www.website.com/$1 [R=301,L]
it gives me TOO MANY REDIRECT ERROR

Which script gives redirect to system 'HTTPS_SERVER'? How can i override this opencart redirection? Or how i can use www.website.com canonical and en.webiste.com subdomain without redirection to www.en.webiste.com >

Newbie

Posts

Joined
Tue May 25, 2021 8:28 pm

Post by rjcalifornia » Wed May 26, 2021 9:42 pm

madmaximus85 wrote:
Tue May 25, 2021 8:37 pm
Hello, i have main website example website.com and i need to redirect it to www.website.com (canonical),
but if i do that in config file (setup www.website.com) : my subdomains goes
en.website.com -> www.en.webiste.com

Which script gives redirect to system 'HTTPS_SERVER'? How can i override this opencart redirection? Or how i can use www.website.com canonical and en.webiste.com subdomain without redirection to www.en.webiste.com >
I think your hosting tech support can help you with that. There's a cPanel configuration to do that without touching any .htaccess or changing subdomains.

Image


Active Member

Posts

Joined
Fri Sep 02, 2011 1:19 pm
Location - Worldwide

Post by EvolveWebHosting » Mon May 31, 2021 12:50 pm

Are both of your config.php files correct and are there any other rewrite rules in your .htaccess file?

Image
50% Off SSD Shared Hosting w/ cPanel
Detailed guide on how to install Opencart


User avatar
Active Member

Posts

Joined
Fri Mar 27, 2015 11:13 pm
Location - Denver, Colorado, USA
Who is online

Users browsing this forum: No registered users and 17 guests