adding RedirectMatch to .htaccess cause a homepage 404 error
-
I’m migrating from blogger to WordPress everything was fine except when I was trying to add a 301 to redirect all old blogger pages like
/p/about.html
to/about
I’ve changed my .htaccess file to look like thatRedirect 301 /2013/12/old-post.html /2014/02/new-post.html RedirectMatch 301 /p(.*)\.html$ //$1 # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
the problem is that my homepage is redirecting to the directory
/age1
I don’t know why but every thing in other pages and posts return fine without any problems.removing line 2 in .htaccess solve the problem so I guess that line is the cause
RedirectMatch 301 /p(.*)\.html$ //$1
all I want is to add a single post to post 301 redirect and another redirect for pages but it seems that the page redirect code is causing a problem with wordpress
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘adding RedirectMatch to .htaccess cause a homepage 404 error’ is closed to new replies.