Hi guys I am having a problem!!! I have moved my old website from frontpage which had .htm and .html extensions to wordpress and changed the permalinks to all .htm Now I want to do 301 redirects in the htaccess file and I am getting a 500 internal server error... This is what I have before the redirects # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine on Options +FollowSymLinks RewriteCond %{HTTP_HOST} ^mydomain\.com$ [NC] RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L] </IfModule> # END WordPress Code (markup): Then I have redirects redirect 301 /Freeware/zip.html http://tips4pc.com/freeware/7zip.htm redirect 301 "/internet-tips/Internet_Explorer _8_Add_Change_homepag_tab.htm" http://tips4pc.com/internet-tips/video-internet-explorer-8-add-or-change-a-homepage-tab.htm Code (markup): I have "" around some urls because there are spaces in the url.... I have around 50 of them.. I am trying to change everything around... I would really appreciate some help..
I had to put this back to get the site working again.. # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
Well I went and found a Wordpress plugin to do it for me... I was doing my head in... I am not sure if it is better to use the .htaccess file instead though...??? What do you think?
If the plugin is giving you correctly formed 301 redirects, then I would say you're golden. Have a look at your .htaccess file, because it's likely the plugin has made changes to your .htaccess anyway.
If you need to be more efficient, then .htaccess file will be better (Apache will handle it with much less work than a PHP script). If you don't have that much traffic, then go with what ever works for you. Also, next time you have errors: Check/Post the error.log file lines from apache - that will include more detailed information on what is actually wrong with your requests.