tjburke79 Posted March 4, 2015 Share Posted March 4, 2015 Hello, I hope someone can help me out. I am trying to create a 301 redirect using a RewriteRule or a RedirectMatch example: /article/2002-03-17/247/test-subject-name-whatver.html I would like to redirect this and all other urls that are in the /article/ directory to my index page, is it possible redirect anything that is in the /articles/ directory? Thanks in advance Link to comment https://forums.phpfreaks.com/topic/295095-mod-rewrite-help/ Share on other sites More sharing options...
requinix Posted March 4, 2015 Share Posted March 4, 2015 RedirectMatch (not Redirect) can do it, and is what I would use. RedirectMatch ^/article/ /index.phpRewriteRule can too, of course. Basically the same thing as above. RewriteEngine on RewriteRule ^/?article/ /index.php [L] Link to comment https://forums.phpfreaks.com/topic/295095-mod-rewrite-help/#findComment-1507531 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.