Home htaccess dynamic to static url passing query
Reply: 0

htaccess dynamic to static url passing query

Pascal Stegers
1#
Pascal Stegers Published in 2017-12-05 11:04:17Z

I am trying to add a mod rewrite to htaccess, problem is that I need to pass a query into the new page. For example :

mysite.com/movies.php?actor=cage needs to become mysite.com/movies/actor/cage/

I tried :

Options +FollowSymLinks
RewriteEngine on
RewriteRule movies/actor/(.*)/ movies.php?actor=$1

But this does not pass the query actor=cage into the new page.

Then the next problem is that I need the old url (mysite.com/movies.php?actor=cage) to become a 301 redirect back to the new url (mysite.com/movies/actor/cage/)

Can anyone help ?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.296358 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO