 swansea
|
HTML Import 2 is wonderful! But, I am having trouble using the .htaccess codes generated by it. When I paste them into my .htaccess file, upload it and try to access my site, I get a server error 500.
Here are a couple of typical lines in the generated code that I cut and pasted (I changed the URL here to be a general illustration):
Redirect http://www.myurl.com/terms.html http://myurl.com/terms-of-use/ [R=301,NC,L]
Redirect http://www.myurl.com/resources-links-general.html http://myurl.com/links-general/ [R=301,NC,L]
My .htaccess file already had the following WordPress code in it:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress
My questions are:
- What am I doing wrong? I tried pasting the generated code both before, and after, the WordPress code, and got server error 500 both times. (My site works fine with only the WordPress code.)
- Do I need to add extra carriage returns between the entries?
I would appreciate any help!
|
 swansea
|
As far as I can tell, the redirect file from HTML Import 2 cannot be cut and pasted directly into the .htaccess file with the WordPress code.
I found the answer to my problem here: http://wordpress.org/support/topic/using-htaccess-to-301-redirect-not-working
Each “Redirect” has to be reworded as a “RewriteRule”. I found the simplest tutorial for this at: http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
Good luck all! And if you find a better way to do this, please post it here.
-
This reply was modified 105 days ago by
swansea.
|