Forum Moderators: phranque
[edited by: not2easy at 6:33 pm (utc) on Jan 3, 2019]
[edit reason] example.com = readability [/edit]
RewriteEngine On
RewriteCond %{THE_REQUEST} /index\.php\?start=1\s [NC]
RewriteRule ^ /photos/winterstorm.php? [R=302,L]
RewriteCond %{THE_REQUEST} /index\.php\?start=2\s [NC]
RewriteRule ^ /photos/farm-cats.php? [R=302,L] RewriteEngine On
RewriteCond %{QUERY_STRING} ^start=1$ [NC]
RewriteRule ^index\.php$ https://www.example.com/photos/winterstorm.php? [R=301,L]
RewriteCond %{QUERY_STRING} ^start=2$ [NC]
RewriteRule ^index\.php$ https://www.example.com/photos/farm-cats.php? [R=301,L]
the secret turned out to be the '\s' at the end of each condition line
would starting off with 301 have created potential cache problems during testing?Browsers do remember 301 responses, so that's potentially an extra step in testing. You have to hit the Refresh/Reload button. Using 302 instead of 301 in testing is a pretty good idea (which I, personally, always forget); just remember to change it to 301 once you're sure it is working right.
replacing phranque's ending $ with \sI hope that was a typo for \b