logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: Syntax 1 .htaccess multistore multidomain
Author
@part



Joined: 25 Nov 2016
Posts: 2
Location: Netherlands

PostPosted: Fri 25 Nov '16 14:35    Post subject: Syntax 1 .htaccess multistore multidomain Reply with quote

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

PostPosted: Sat 26 Nov '16 10:20    Post subject: Reply with quote

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

PostPosted: Mon 28 Nov '16 13:11    Post subject: Reply with quote

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


Reply to topic   Topic: Syntax 1 .htaccess multistore multidomain View previous topic :: View next topic
Post new topic   Forum Index -> Apache