Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache mod_rewrite question... Is it possible to do... ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
cron0
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jan 2004
Posts: 132
Location: Montreal, Quebec

PostPosted: Fri Feb 11, 2005 1:50 pm    Post subject: Apache mod_rewrite question... Is it possible to do... ? Reply with quote

Using mod_rewrite (or something else?) how Can I do something like this:

http://www.$1.domain.com to redirect to http://domain.com/$1.php


Is that even possible? Don't ask why, I have a client that wants to do that ;-)

Thanks!
Back to top
View user's profile Send private message
tuxmin
l33t
l33t


Joined: 24 Apr 2004
Posts: 838
Location: Heidelberg

PostPosted: Fri Feb 11, 2005 2:51 pm    Post subject: Reply with quote

If your FQHN is really that special try this:

RewriteCond %{HTTP_HOST} ^www\.(.*)\.domain\.com$
RewriteRule .* http://domain.com/%1.php [R,L]


Read here for details
_________________
ALT-F4
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum