Forums Closed Want to 301 Redirect everything to a closed message

Forums closed due to spam and i want to redirect all the posts in from the forum to a closed message in the root.

Example:

and all content from http://somedomain.com/forums/

should go to
http://somedomain.com/closed.php

I can do the folder just having issues with the content of the folder

Thanks!

Something like this perhaps?


RewriteEngine On
RewriteRule ^forums/(.*) http://somedomain.com/closed.php [R=301,L]

Might need to be tweaked a little, I’m not too good with the rewrites :slight_smile:

Since you’re not at all interested in what’s in the URL after /forums and the fact that the URL starts with “/forums” is indication enough to fire the rule, there is no need to tell the regex parser to go and match the rest of the URL (i.e., the /(.*) part), that’s just doing work for nothing.

You can use what Immerse posted, but leave out /(.*) :slight_smile:

(it will work with that code btw)