.htaccess redirect all other pages after manual 301's

86 Views Asked by At

so we have a whole load of 301 redirect's in out htaccess because we migrated to a new site and a lot of the content is in a different location now. I need to add something to catch the rest of the URL's that aren't manually specified and point them to our homepage.

1

There are 1 best solutions below

0
anubhava On

You can use this redirect rule as very last rule (after all of your other rewrite rules):

RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule . / [L,R=302]