My webhost recently upgraded their PHP to a new version, and now one of my redirects no longer works.
The redirect that doesn't work now is:
RewriteRule toppers/i-(.*)/n-(.*).html$ toppers.php?i=$1&n=2
Which I find strange because all my other, similar rules still work.
Here is my full .htaccess file:
Options +FollowSymLinks
RewriteEngine on
RewriteRule toppers/i-(.*)/n-(.*).html$ toppers.php?i=$1&n=2
RewriteRule classes/i-(.*)/n-(.*).html$ classes.php?i=$1&n=2
RewriteRule news/i-(.*)/n-(.*)\.html$ news.php?i=$1&n=2
RedirectMatch 301 ^/cake-topper-pictures-pages/(.*) http://www.caketopper.co.uk/wedding-toppers.php
RedirectMatch 301 ^/cake-topper-picture-pages/(.*) http://www.caketopper.co.uk/wedding-toppers.php
RedirectMatch 301 ^/Cake-Topper-Pictures-Pages/(.*) http://www.caketopper.co.uk/wedding-toppers.php
RedirectMatch 301 ^/feedback-topper-pages/(.*) http://www.caketopper.co.uk/toppers/i-1/n-Couple-on-red-dragon.html
RedirectMatch 301 ^/feedback-toppers/(.*) http://www.caketopper.co.uk/toppers/i-1/n-Couple-on-red-dragon.html
ErrorDocument 404 /404.html
What could be wrong and how can I fix it?
To varify that it isn't the PHP file, I have tried:
echo $topperId = $_GET['i'];
echo $topperName = $_GET['n'];
And I get nothing echoed out from the URL.
Options +FollowSymLinks RewriteEngine on
RewriteCond %{REQUEST_URI} toppers/i-(.)/n-(.).html [NC] RewriteRule .* toppers.php?i=%1&n=%2 [L,NC]
RewriteCond %{REQUEST_URI} classes/i-(.)/n-(.).html [NC] RewriteRule .* classes.php?i=%1&n=%2 [L,NC]
RewriteCond %{REQUEST_URI} news/i-(.)/n-(.).html [NC] RewriteRule .* news.php?i=%1&n=%2 [L,NC]