Forum Moderators: phranque
I have page that displays results fetched from a database like this:
show.php?action=show&word= [displays individual items]
show.php?action=search&by=[Letter]&nr_page=[Number] [pagination for letters A-z & numbers 0-9). Letter A have multiple pages, such as A1, A2, ... An.
The mod rewrite for the first is:
RewriteRule ^([A-Za-z0-9_-]*)\.html$ /subdirectory/show.php?action=show&word=$1
This displays pages as 1.html, 2.html, etc.
I tried to write another rewrite for the multiple pages, but I simply could not manage.
RewriteRule ^([A-Za-z0-9_-]*)\.html$ /subdirectory/show.php?action=search&by=$1&nr_page=$3
This should display pages in the form of A1.html, A2.html, etc. But it do not.
How can I rewrite for this?
Thank you in advance.
There is also a thread [webmasterworld.com] in our library which may prove useful.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim
I tried to write another rewrite for the multiple pages, but I simply could not manage.
RewriteRule ^([A-Za-z0-9_-]*)\.html$ /subdirectory/show.php?action=search&by=$1&nr_page=$3This should display pages in the form of A1.html, A2.html, etc. But it do not.
How can I rewrite for this?
RewriteRule ^([A-Za-z0-9-]+)([0-9]+)\.html$ /subdirectory/show.php?action=search&by=$1&nr_page=$2 [L]