Jump to content

file.php?id=something to file/something


Michdd

Recommended Posts

Errrr....  I'm quite confused....  Have you tried anything?  Also, you would technically be rewriting file/something to file.php?id=something, not the other way around.

 

 

Anyway:

 

 

RewriteEngine On

RewriteRule ^file/([^/]+)/?$ /file.php?id=$1

 

 

Should do it.  Take off the /? part if you want just /file/something and not that and /file/something/.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.