RE: [users@httpd] A lil Mod Rewrite help please...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



What about something like this?

   RewriteEngine On
   RewriteLog logs/rewrite_log
   RewriteLogLevel 9

   RewriteCond %{HTTP_HOST} ^(webmail\.[^:]+)
   RewriteRule .* http://%1:7080/webmail.exe [R]

-ascs

< 

-----Original Message-----
From: m i l e s [mailto:magicmiles@xxxxxxxxx] 
Sent: Saturday, April 08, 2006 3:58 AM
To: users@xxxxxxxxxxxxxxxx
Subject: [users@httpd] A lil Mod Rewrite help please...

Hi,

Pardon me for asking this if its already been asked which Im certain that it has, regex is not my specialty...

If I have the following series of urls:

webmail.theusersdomain.com
webmail.somedomain.com
webmail.myuserdomain.com
webmail.etc.com

you get the picture....

Instead of adding hostdirections in the apache conf file....I was thinking a mod_rewrite rule would do the trick rather nicely....what I thought of was this:

RewriteEngine on
RewriteRule ^webmail\.[a-z]+\.com$ webmail\.[a-z]+\.com\:7080/scripts/
webmail.exe

Am I in the right ball park ?

And lastly, would this rule live in the httpd.conf file or would this rule live somewhere else ????

Or if I miss my guess would this rule have to live in a .htaccess file in EVERY domain_directory that I host ?

M i l e s.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux