views:

25

answers:

1

My site was under example.com/waha/. Now I move the site right under the root example.com.

I want to 301 redirect all the old links like example.com/waha/notice/5803 to example.com/notice/5803.

How can I do it?

My current .htaccess file is below.

<IfModule mod_rewrite.c>
  RewriteEngine On

  # NOTE: change this to your actual StatusNet path; may be "/".

  RewriteBase /

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule (.*) index.php?p=$1 [QSA,L]
</IfModule>

<FilesMatch "\.(ini)">
  Order allow,deny
</FilesMatch>
Options -Indexes
+1  A: 

Try this rule in front of your other mod_rewrite rule:

RewriteRule ^waha/(.*) /$1 [L,R=301]
Gumbo