I am trying to setup a mod rewrite rule to change urls like:
Into:
http://www.site.com/index.php?play=4435
Below is what I have but it is not quite right...
RewriteEngine On
RewriteRule ^([^/\.]+)/?$ index.php?play=$1 [L]
I am trying to setup a mod rewrite rule to change urls like:
Into:
http://www.site.com/index.php?play=4435
Below is what I have but it is not quite right...
RewriteEngine On
RewriteRule ^([^/\.]+)/?$ index.php?play=$1 [L]
RewriteEngine On
RewriteRule ^play/([^/]*)$ /index.php?play=$1 [L]
That should change http://www.site.com/play/4435 into http://www.site.com/index.php?play=4435
Hope that helps :)
Here's a more generic rule that works for more than just 'play'.
RewriteEngine On
RewriteRule ^(.+)/(.+)$ /index.php?$1=$2 [L]