ServBit Experts Community
Need help with server administration?
-
.htaccess redirect from static site to Wordpress
Posted on May 26th, 2009 No commentsI’m trying to redirect pages from an old static site to new pages in WordPress. So, for example,
http://www.mysite.com/contact.htm
should redirect to:
http://www.mysite.com/contact
I’m using the following in the .htaccess file, but it’s not working:
redirect 301 /mysite/contact.htm http://www.mysite.com/contact
I ended up figuring this out myself and implemented as a series of rewrites along the lines of:
RewriteCond %{HTTP_HOST} ^jeffthomascobb.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.jeffthomascobb.com$
RewriteRule ^contact\.htm$ “http\:\/\/www\.jeffthomascobb\.com\/contact\/” [R=301,L]etc.
Works fine now




Recent Comments