RewriteEngine on
RewriteRule ^forum-(.*).html$ ./forum.php?id=$1
now if the url is forum.php?id=231, how can i auto change the url to forum-231.html
thanks,
haim .
3
Contributors
5
Replies
15 Hours
Discussion Span
1 Year Ago
Last Updated
6
Views
Related Article:Auto change picture
is a PHP discussion thread by zacharysr that has 1 reply, was last updated 1 year ago and has been tagged with the keywords: auto, change, day, logo, picture.
i thought the same, but thats works for me, and the code was just an exmplame,
i will check yours,
thanks :)
thats not works :(
its my code:
RewriteEngine On
RewriteRule ^forum-(.*).html$ index.php?showforum=$1 [L,QSA]
when im going to index.php?showforum=2 its not redirecting me to forum-2.html,
when im going to forum-1.html i see the content of index.php?showforum=1
when im going to index.php?showforum=2 its not redirecting me to forum-2.html,
when im going to forum-1.html i see the content of index.php?showforum=1
No this is expected. The whole point is that your urls (the ones you use in your links) are in the 'short' format. This is what everybody sees. The 'long' url should still work, after all this is what the server sees with the short version (rewrite).
I NEED CODE thats redirects automaticaly to forum-1.html, if the url is index.php?showforum=1, i cant change the link because is abig system and he got alot of links .