...

RewriteRule help

keys88
03-17-2011, 06:32 PM
I would appreciate help with a RewriteRule.

This is nearly identical to other rules I use that work just fine, but something here isn’t right.

I have addresses that look like these:


http://mysite.com/reports/1103-march-17/?page=1&mode=pause
http://mysite.com/reports/1103-march-17/?page=5&mode=play


which call the local index file, thus doing the same as:


http://mysite.com/reports/1103-march-17/index.php?page=1&mode=pause
http://mysite.com/reports/1103-march-17/index.php?page=5&mode=play


and I want to be able to use short-form URLS like this:


http://mysite.com/reports/1103-march-17/1/pause
http://mysite.com/reports/1103-march-17/5/play


In the local folder’s htaccess I have this:

RewriteEngine On
RewriteRule ^(\d*)/(pause|play)$ ?page=$1&mode=$2 [NC,L]


but that changes the sample short-form URLS into

http://mysite.com/reports/1103-march-17/pause
http://mysite.com/reports/1103-march-17/play


in the address bar (with the "1/" or "5/" removed), and the browser returns "Not Found”.

This seems a simple substitution ... but ... ?

Thank you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum