mod rewrite question

Associate
Joined
27 Jun 2006
Posts
1,473
Hi guys.

I am trying to use mod_rewrite so the url:

Code:
http://domain.com/singleword

so it actually goes to:

Code:
http://domain.com/file.php?singleword

Being new to this stuff is this actually possible and any pointers appreciated :)

Cheers
M
 
This should do the trick:

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ file.php?$1 [L]
 
Back
Top Bottom