htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: silent redirect site.nl to site.com
PostPosted: 28 Jun 2008 13:22 
Offline

Joined: 28 Jun 2008 12:29
Posts: 1
Hello,
 
I'm currently struggling with making a silent redirect from site.nl to site.com. Did Google for days but cannot figure out how to achieve this silent redirection.
 
Here is my scenario: application is located on site.com and it is localized accepting user language as parameter: locale=en_US (English) or locale=nl_NL (Dutch).
 
I have main domain site.com and add-on domain site.nl. Add-on domain on my host means that site.nl is a folder nl located in www folder of the main domain site.com. In other words I have the following directory structure on the server:
www (= this is site.com)
www/nl (= this is site.nl)

 
What I'm trying to achieve is for each site to silently redirect all requests to site.com/test/test.php?locale=language
 
Example:
site.com redirects to site.com/test/test.php?locale=en_US
site.nl redirects to site.com/test/test.php?locale=nl_NL

 
So far the redirection works from both sites but in a case of site.com it is silent and in a case of site.nl it is not (it shows full path to the page after redirection took place and I need it to show only the domain name site.nl what user originally enters into the address bar).
 
Currently I have the following in .htaccess of site.com (which is working good and hides the new url showing only site.com in address bar):
RewriteEngine On
RewriteBase /
RewriteRule ^$ http://www.site.com/test/test.php?locale=en_US [NC,L]

 
And the same in .htaccess of site.nl (which is working badly because it shows the new url in address bar and I want it to hide it and display only site.nl):
RewriteEngine On
RewriteBase /
RewriteRule ^$ http://www.site.com/test/test.php?locale=nl_NL [NC,L]

 
Can somebody please help me with hiding the url when redirecting from site.nl to site.com?
 
Regards,

Daniel


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
Powered by phpBB