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: htaccess internal redirect |
|
Author |
|
quali74
Joined: 13 Oct 2006 Posts: 2
|
Posted: Fri 22 Feb '13 13:03 Post subject: htaccess internal redirect |
|
|
hello,
Need some help on this redirect.
I have a site called: www.a.co.uk and it contains a page called page1. www.a.co.uk/folder1/page1
I have other domains connected to the site
www.b.co.uk
www.c.co.uk
www.d.co.uk
How can I access page1 typing the address www.b.com and have the browser url bar display www.a.co.uk/THISISPAGE1 if possible.
I have written
Code: | RewriteCond %{HTTP_HOST} ^www\.b\.com$ [NC]
RewriteRule http://www.a.co.uk/folder1/page1 http://www.a.co.uk/THISISPAGE1 [R=301,L] |
The redirect seems to work but the content is not being displayed.
Thanks |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 26 Feb '13 12:29 Post subject: |
|
|
Do you see the new URL in your browser? |
|
Back to top |
|
quali74
Joined: 13 Oct 2006 Posts: 2
|
Posted: Tue 26 Feb '13 13:09 Post subject: |
|
|
solution:
Code: | RewriteCond %{HTTP_HOST} ^(www\.)?b\.com$ [NC]
RewriteRule .* https://a.co.uk/THISPAGE1 [R=301,L]
RewriteRule ^THISPAGE1$ /index.php?param1=folder1¶m2=folder2&pagename=page [L] | [/quote] |
|
Back to top |
|
|
|
|
|
|