0
votes

Hello I would like to redirect all my website/forum/ and all subpages (e.g.: /forum/viewtopic.php?f=2&t=453) to my index page.

I have tried a few different methods but they do not work.

I tried RedirectMatch 301 ^/forum/.*$ http://myhomepage.com but it leaves part of the forum page in the url.

I also tried: RewriteEngine On RewriteBase / RewriteRule ^/forum/.*$ http://myhomepage.com [L,R=301]

but that did nothing.

Any help would be appreciated.

1

1 Answers

0
votes

For Apache's httpd.conf,

Try using RewriteRule ^/forum/(.*)$ http://myhomepage.com/ [R,NC]

The (.*) should catch anything that comes after /forum/. The R means redirect, and NC means case insensitive.