Need a hand with mod_rewrite

Duncan

Member
I have folders on my website, www.example.com/folder/name/file.php which is the default address. However I want to have it rewritten to name.example.com/file.php so it looks a little cleaner in the url. I'm only assuming mod_rewrite is the proper way to do this, so any help would be greatly appreciated.
 
Is there a common theme, or example here, or do you just want www.example.com/folder/name/file.php -> name.example.com/file.php?

I think it's something around

Code:
RewriteRule ^([0-9][0-9])$.example.com/([0-9][0-9])$.php www.example.com/folder/$1/$2.php

Also, do you want it to be HTTP 301 or 302?
 
Top Bottom