homepage Welcome to WebmasterWorld Guest from 54.226.173.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Rewrite Rule
mapping to a different URL
rfontaine




msg:907148
 2:08 pm on Feb 4, 2003 (gmt 0)
Hi,

I would like to alter our .htaccess so that when someone goes to any page on our website they are redirected to an identical directory but on another domain.

For example,
if someone goes to www.abc.com/pages/etc/fred.php
they are redirected to www.xyz.com/pages/etc/fred.php

There are multiple directories and sub directories.
It should also work whether or not visitors use "www".

From the forums I gleaned the following, however it does not seem to work...

Options +FollowSymlinks
RewriteEngine on
RewriteCond %{HTTP_HOST}!^www\.xyz\.com
RewriteCond %{HTTP_HOST}!^111\.222\.333\.444
RewriteRule ^(.*)$ http://www.xyz.com/$1 [R=permanent,L]

I know rewrite works on our servers

Thank you in advance :-)

 

Brett_Tabke




msg:907149
 2:45 pm on Feb 4, 2003 (gmt 0)

You could do a simple redirect:

Redirect 301 /fred [webmasterworld.com...]

Will redirect all traffice from the fred directory to www.webmasterworld.com/fred/

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved