Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Syntax 1 .htaccess multistore multidomain |
|
Author |
|
@part
Joined: 25 Nov 2016 Posts: 2 Location: Netherlands
|
Posted: Fri 25 Nov '16 14:35 Post subject: Syntax 1 .htaccess multistore multidomain |
|
|
We've made a multistore multidomain webshop we're the backoffice resolves on 1 url.
The old website .nl had same url's as the .be
So when i redirect 1 url he picks the wrong language site.
How or with witch syntax can i redirect (301) url's from.
url.be/category/example1.html
to
https://www.url.be/42-example1
and in the same htacces
url.nl/category/example1.html
to
https://www.url.nl/42-example1
Anyone ideas to put me on the wright way??
Best regards
@part |
|
Back to top |
|
James Blond Moderator

Joined: 19 Jan 2006 Posts: 7402 Location: EU, Germany, Next to Hamburg
|
Posted: Sat 26 Nov '16 10:20 Post subject: |
|
|
Untested, but a start
Code: | RewriteCond %{HTTP_HOST} !^www\.url\.nl$ [NC]
RewriteRule ^/category/(.*)$ http://www.url.nl/42-$1 [L,R] |
|
|
Back to top |
|
@part
Joined: 25 Nov 2016 Posts: 2 Location: Netherlands
|
Posted: Mon 28 Nov '16 13:11 Post subject: |
|
|
Still the domain goes to the .nl version istead off the .be version.
Can you sent me an email or PM so i can tell you some more about the project?
Current example
RewriteCond %{HTTP_HOST} !^www\.url\.nl/category/text.html [NC]
RewriteRule ^/category/(.*)$ https://www.url.nl/15-text1 [L,R]
RewriteCond %{HTTP_HOST} !^www\.url\.be/category/text.html [NC]
RewriteRule ^/category/(.*)$ https://www.url.be/15-text1 [L,R] |
|
Back to top |
|
|
|
|
|
|