After a site redesign, I've got a couple of pages that need to be redirected. Everything is staying on the same domain, just a couple of things have been reorganised and/or renamed. They are of the form:
/contact.php
is now:
/contact-us.php
Using the .htaccess file, I've added this line, which is the one I find recommended most:
RedirectMatch 301 /contact.php /contact-us.php
This is mostly fine - it does the job - the problem is, it also redirects:
- /team1/contact.php
- /non-existant-folder/contact.php
Is there a way of specifying that I only want to redirect the contact.php in the root?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…