![]() |
Rewrite rewritten url
Hi ... i am confused
I have this PHP Code:
And it creates url like this http://domain.com/blog/Trki which is gr8 but i dont want to display this /blog/Trki My dreamed url should looks like this: http://domain.com/Trki I tried something like this RewriteRule ^([a-zA-Z0-9\-]+)/([a-zA-Z0-9\-]+)$ index.php?var2=$2 [L] ( i removed the first part but i think it was pretty poor try) :P hm? :) PS: i want to do it just when the 'var1' == blog or something like this works too good RewriteEngine On RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?var1=blog&var2=$1 but here is the problem that.. if i want to visit /Home .. it takes it like var1=blog&var2=home... i could make some conds. like urls who matchs home or contact or whatever will be redirected but its not practical. |
you have to pass the entire uri to the script (index.php in your case) and then parse it in it
|
Quote:
okay i have solved it in different way using php when there was no replies :P |
| All times are GMT +1. The time now is 01:40 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.