I need to remove ?id=
and &title=
from this url using .htaccess file.
URL now – http://www.XXXX.com/video.php?id=XX&title=XXX-XXX-XXX
What I need – http://www.XXXX.com/video.php/XX/XXX-XXX-XXX
I already have removed .php from all links.
I need to remove ?id=
and &title=
from this url using .htaccess file.
URL now – http://www.XXXX.com/video.php?id=XX&title=XXX-XXX-XXX
What I need – http://www.XXXX.com/video.php/XX/XXX-XXX-XXX
I already have removed .php from all links.
4
Answers
Thanks you so much for all this answers.Subodh Ghulaxe have posted a good answer.
But this is working code for me.
Sumurai8 finished this code in here ( complete .htaccess code ). I hope this code will help to someone.For css, js, images make sure to use absolute paths.
Following htaccess code will do your work
add below code to your
.htaccess
file.output is
this code is working for me i hope it is working for you.
In order to access the querystring you need to use a
RewriteCond
statement like this:The above example works when id and title parameters are in the exact order of your example. If there can be other parameters in the querystring, or if the parameters can be in any order, you would need to adjust the rules.