This seems like a simple problem but the only bit of mod_rewrite I know I learned from here. I've got a slightly more complex problem now, I need to rewrite:
- Code: Select all
http://domain.com/proj/app/file.php?profile=1
- Code: Select all
http://domain.com/proj/app/file/profile/1/
I already have the code to rewrite file.php to file/ when there is no query string, but I'm struggling with the query string on the end. I'm using the following code:
- Code: Select all
RewriteRule ^profile/([^/]+)/?$ file.php?profile=$1 [QSA,L]
- Code: Select all
File does not exist: /Applications/MAMP/htdocs/proj/app/file
Sorry if this is a confusing description but this is hard to explain. I'd be happy to provide any further info about this if needed.
Cheers
Joe