Claudiu
Regular Member
- Feb 28, 2009
- 374
- 112
I have an html template that displays urls like: website.com/product.html?id=7 and i need to rewrite the url to a user friendly one like website.com/product/7
I've managed to redirect the ugly url to nice url, but i get 404 error
The urls are written through a javascript file.
Since my knoledge on js, apache, php are very limited, i need your help.
i'd appreciate some ideeas on why do i get 404 error and what solutions am i left with on making this work.
htaccess (part of it)
I've managed to redirect the ugly url to nice url, but i get 404 error
The urls are written through a javascript file.
Since my knoledge on js, apache, php are very limited, i need your help.
i'd appreciate some ideeas on why do i get 404 error and what solutions am i left with on making this work.
htaccess (part of it)
Code:
rewritecond %{QUERY_STRING} ^id=(.+)
RewriteRule ^product\.html$ http://website.com/%1? [R=301,L]
Last edited: