![]() |
mod_rewrite question
I've heard using mod_rewrite is the best way to get a more clean url.
I have file.php?do=view&id=X and I want to change to file.php?id=X like how forumdisplay.php works, what would the rewrite rule be for it? :confused: Thanks |
You need the do=view part for the script else it may not function properly.
You might be able to do something like file.php/view/X or something but I don't know much about mod_rewrite so I'll let someone else advise you. |
I am just learning mod_rewrite but here is a try
Code:
RewriteRule ^file.php?id=([^/]*)$ /file.php?do=view&id=$1 |
All times are GMT. The time now is 05:10 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|