Post by eronny66 » Sat Dec 02, 2017 6:09 pm

Hello,
I use opencart 2.1.0.2
I have a webshop with ssl and an dutch extension ********.nl.

I have added a second store with an eu extension ********.eu.
It is intended that the .eu shop points to the .nl shop, but both should use there own urlname in the adress bar.
Both have non-www url's and i have a multidomain ssl certificate.

I have changed the dns, ********.eu has a pointers to the ip of ********.nl.
and i have created a alias for ********.eu on the ********.nl. domain.

This is my .htaccess:

<FilesMatch "\.(tpl|ini|log)">
Order deny,allow
Deny from all
</FilesMatch>

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.********\.nl [NC]
RewriteRule ^(.*)$ https://********.nl/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^www\.********\.eu [NC]
RewriteRule ^(.*)$ https://********.eu/$1 [L,R=301]

Unfortunately, just the ********.nl is visable in the address bar. (with ssl)
If i trie the ********.eu it still displays ********.nl

Can someone help me with the right .htaccess ?

Many thanks in advance

Best regards Ronny

Newbie

Posts

Joined
Fri Dec 01, 2017 8:23 pm

Post by CoronaTechniek » Sat Dec 02, 2017 6:53 pm

Try this for your www and ssl

Code: Select all

#Force www: not sub
RewriteCond %{HTTP_HOST} ^[0-9a-zA-Z-]+\.[a-zA-Z]{2,}$
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
#Force www: not sub

#SSL
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#SSL
in place of

Code: Select all

# SEO URL Settings
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.********\.nl [NC]
RewriteRule ^(.*)$ https://********.nl/$1 [L,R=301,NC]
RewriteCond %{HTTP_HOST} ^www\.********\.eu [NC]
RewriteRule ^(.*)$ https://********.eu/$1 [L,R=301]

http://www.koienvijvercentrum.nl Alles voor Koi en Vijver Opencart 2.3.0.2


User avatar
Active Member

Posts

Joined
Sat Dec 17, 2011 4:25 am
Location - Groningen

Post by eronny66 » Wed Dec 27, 2017 8:50 pm

Just forgot :(

Thanx for your help !

Newbie

Posts

Joined
Fri Dec 01, 2017 8:23 pm
Who is online

Users browsing this forum: No registered users and 23 guests