dj-kenpo Posted July 27, 2007 Share Posted July 27, 2007 is it possible posible via a header to detect if the url (or $_get["title"] in my case) has underscores and if so send to the 404 page? my old urls had underscore, the new ones use more standard dashes, and the bots are all still roaming the old pages (which don't work and have errors) so I'd like to tell them to not go there I guess via 404.. Link to comment https://forums.phpfreaks.com/topic/62044-if-url-contains-_-send-to-404/ Share on other sites More sharing options...
Danltn Posted July 27, 2007 Share Posted July 27, 2007 RewriteEngine On RewriteBase / RewriteRule _ /404document.php [QSA,L] ErrorDocument 404 /404document.php Link to comment https://forums.phpfreaks.com/topic/62044-if-url-contains-_-send-to-404/#findComment-308908 Share on other sites More sharing options...
per1os Posted July 27, 2007 Share Posted July 27, 2007 is it possible posible via a header to detect if the url (or $_get["title"] in my case) has underscores and if so send to the 404 page? my old urls had underscore, the new ones use more standard dashes, and the bots are all still roaming the old pages (which don't work and have errors) so I'd like to tell them to not go there I guess via 404.. Sure, but a better thing to do would 301 the bots to the new page. Link to comment https://forums.phpfreaks.com/topic/62044-if-url-contains-_-send-to-404/#findComment-308909 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.