I have a problem rewriting urls and cannot find where i'm wrong. The needed module in Apache is activated The server can read the .htacces file The .htaccess contain the following : RewriteEngine on Options +FollowSymLinks RewriteRule event-(.*)\.htm$ /events/search.php?name=$1 I want to change the dynamic url www.mysite.com/events/search.php?name=test TO www.mysite.com/event-test.htm Partially works! If i type the htm page directly in the browser all it's ok..i find my page, but here is the problem : doesn't apache must rename all links matching the rule in dynamics pages (e. www.mysite.com/events/index.php) ? Maybe i need to add some php script to generate this static urls ? Thanks for help !
Ok, i have to change my dynamic url in the php page to call new urls... The variables doesn't change ... only the url type ... so in index.php when i have a call like : search.php&name=$test will become event-$test.htm Ok ok ... so stupid auto-answered question ... Maybe can help someone...
Apache doesn't change URLs, only makes the fake URLs work. That's why you had to change the links in the script. A .htaccess file can't edit a script!! If you try to redirect from dynamic to static using .htaccess, you get a forever loop... no old URL, no new URL, no old....