AdRock Posted August 23, 2006 Share Posted August 23, 2006 I have this rewrite rule which reads [url=http://www.jackgodfrey.org.uk/news/1/2]www.jackgodfrey.org.uk/news/1/2[/url][b]RewriteRule ^([A-Za-z0-9]+)/([0-9]+)/([0-9]+)/?$ index.php?page=$1&limit=$2&pagenum=$3 [L][/b]How would I rewrite that to read [url=http://www.jackgodfrey.org.uk/news/2]www.jackgodfrey.org.uk/news/2[/url] so it takes the /1/ out as that never changes. It's only a limit to how many records are listed per pageThe second question is this:I have 4 pages names jack1, jack2, jack3 and jack4How would i create a rule to read like this [url=http://www.jackgodfrey.org.uk/jack/1]www.jackgodfrey.org.uk/jack/1[/url] etc? Quote Link to comment Share on other sites More sharing options...
wildteen88 Posted August 23, 2006 Share Posted August 23, 2006 Do you wantr to get rid of the limit parameter completly if so use this:[code]RewriteRule ^([A-Za-z0-9]+)/([0-9]+)/?$ index.php?page=$1&pagenum=$2 [L][/code]For your secound question, I'm not sure but prehaps this:[code]RewriteRule ^jack/([0-9]+)/$ jack$1.php[/code]by file name you mean jackx.php, x being a number? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.