Reputation: 168
I use these 4 lines:
RewriteCond %{QUERY_STRING} !marker
RewriteCond %{QUERY_STRING} id=([0-9]+)
RewriteRule ^/?picture.php$ %1? [R=301,L]
RewriteRule ^/?p([0-9]+)$ picture.php?marker&id=$1 [L]
to translate www.example.com/p4444
to www.example.com/picture.php?id=4444
and I must say it works flawlessly.
Then I have:
RewriteRule ^([0-9]+)$ vid.php?vid=$1 [R,NC,L]
and that works to translate www.example.com/7777
to www.example.com/picture.php?id=7777
.
However, the problem I have is that when I have both of them in use, the 2nd one does not work anymore.
Because this is not a very widely used rewrite, I could not find any solutions to these specific two cases.
Upvotes: 1
Views: 41
Reputation: 1549
Check if this works @bombelman
RewriteCond %{QUERY_STRING} !marker
RewriteCond %{QUERY_STRING} id=([A-Za-z0-9-]+)
RewriteRule ^/?picture.php$ %1? [R=301,L]
RewriteRule ^/?([0-9-]+)$ picture.php?marker&id=$1 [L]
Upvotes: 1