Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Url rewriting

Posted on 2006-07-17
5
Medium Priority
?
248 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 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses
Course of the Month8 days, 9 hours left to enroll

598 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