Im struggling to get to grips with mod rewrite, and i was hoping some smart person here could point me in the right direction.
I have managed to get the pages to load without the .php extension, but when i add a query string it screws up.
I followed a tutorial which showed me how to make the query strings as product.php/category/12/id/11 but now i want it to just be product/category/12/id/11.
This is the .htaccess code i have so far (which doesnt work as i was just guesses :D)
Question
mikeaag
hey,
Im struggling to get to grips with mod rewrite, and i was hoping some smart person here could point me in the right direction.
I have managed to get the pages to load without the .php extension, but when i add a query string it screws up.
I followed a tutorial which showed me how to make the query strings as product.php/category/12/id/11 but now i want it to just be product/category/12/id/11.
This is the .htaccess code i have so far (which doesnt work as i was just guesses :D)
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([A-Za-z0-9-]+)/?([A-Za-z0-9-]+)/?+$ $1.php/$2Anyone know where im going wrong?
Thanks in advance
Link to comment
Share on other sites
4 answers to this question
Recommended Posts