Forum Moderators: phranque
I'm using mod-rewrite on my dynamic category URLS which would make
eg. 'mysite.com/browse.php?id=358' to 'mysite.com/clean-title'
The code I am using for this is
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^clean-title?$ /browse.php?id=358 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /browse\.php\?id=358\ HTTP/
RewriteRule ^browse\.php$ /clean-title? [R=301,L] This works fine, however a few of my categories involve several pages... so in an attempt to make the urls look like
eg. 'mysite.com/browse.php?id=358&page=2' to 'mysite.com/clean-title-2'
i have used
RewriteRule ^clean-title-([^/]+)?$ /browse.php?id=358&page=$1 [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /browse\.php\?id=358&page=([^&]+)\ HTTP/
RewriteRule ^browse\.php$ /clean-title-%1? [R=301,L] Now this works for the pages #2 and upward, however im getting a 404 error on the 1st page (mysite.com/clean-title) as the 1st page dosn't have "&page=1" on the end of the URL.
Anyone have any tips on how to make this work?
Cheers