Thread: Mod_rewrite
View Single Post
Old 06-17-2008, 04:02 PM   #5 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

I'm guessing for the first one something along the lines of

Code:
RewriteCond %{HTTP_HOST} ([^.]+)\.mysite\.com [NC]
RewriteRule ^(.*) http://www.mysite.com/user/index.php?user=%1 [P, L]
...might be what you want, and the second...

Code:
RewriteRule ^features/$ features.php [L]
You could also use a small regular expression to easily make the PHP extension invisible on an entire directory of files;

Code:
RewriteRule ^([A-Za-z0-9]+)/$ $1.php [L]
-m
delayedinsanity is offline  
Reply With Quote