Solved

Url rewriting

Posted on 2006-07-17
5
242 Views
Last Modified: 2010-03-04
how to redirect http://mail.mydomain.com
to http://www.otherdomain.com/othermail

many thanks
0
Comment
Question by:us111
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 27

Expert Comment

by:caterham_www
ID: 17125252
it depends...

If http://mail.mydomain.com is a separate account, you could use in a .htaccess file (if you don't have access to the configuration files)

Redirect 301 / http://www.otherdomain.com/othermail/

But if both domains are pointing to the same location, you must use mod_rewrite to check the HTTP_HOST.
0
 
LVL 8

Author Comment

by:us111
ID: 17128443
To be more precised, this is the same server and mod_rewrite is require for this purpose but how....
0
 
LVL 27

Accepted Solution

by:
caterham_www earned 500 total points
ID: 17129465
ok. So you must check the Host. That can be done with a condition.

RewriteCond %{HTTP_HOST} =mail.mydomain.com
RewriteRule ^(.*) http://www.otherdomain.com/othermail/$1 [R=301,L]

that will issue a redirect if the user comes from mail.mydomain.com.
0
 
LVL 8

Author Comment

by:us111
ID: 17129589
ok gonna try tonight
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question