WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] .htaccess

[Resolved] .htaccess

  • Trying to understand how to redirect old website links to new wp pages using .htaccess.

    I used the HTML Import 2 to import old site files to wp on a new service provider/server. This plugin gave me redirect codes to copy and paste in the .htaccess file which I tried but I got a error code 500. I have about 200 redirects from the old website to the new page names just to note.

    My .htaccess file is listed below the questions I have. Everything above the comment “# Begin my redirects” was original working code. I don’t understand this coding much and did a lot of reading on the internet with very little luck. I did find if I write the redirects differently it will work i.e.
    “redirect 301 /Acupuncture.htm http://www.natureshealing.info/acupuncture-4/
    My questions are as follows:
    1. Is the # Begin my redirects code positioned in the right place i.e. after the # END WordPress block of code?
    2. What is the proper coding format for these redirect statements?
    3. How do I make the code case-insensitive? I tried to add [NC] at the end of the redirect statement but it didn’t work.

    # Use PHP5 Single php.ini as default
    AddHandler application/x-httpd-php5s .php
    
    # 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
    
    # Begin my redirects
    Redirect	http://www.natureshealing.info/Acupuncture.htm	http://www.natureshealing.info/acupuncture-4/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/Articles.htm	http://www.natureshealing.info/articles-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/Charts.htm	http://www.natureshealing.info/charts-6/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/ChiKungTaiCHiForms.htm	http://www.natureshealing.info/chikungtaichiforms-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/Classes.htm	http://www.natureshealing.info/classes-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/ClinicInfo.htm	http://www.natureshealing.info/clinicinfo-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/Conditions_Treated.htm	http://www.natureshealing.info/conditions_treated-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/ContactUs.htm	http://www.natureshealing.info/contactus-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/Diet.htm	http://www.natureshealing.info/diet-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/Directions.htm	http://www.natureshealing.info/directions-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/EvidenceBasedProtocols.htm	http://www.natureshealing.info/evidencebasedprotocols-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/FAQ.htm	http://www.natureshealing.info/faq-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/FriendsONH.html	http://www.natureshealing.info/friendsonh-5/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/Health-HarmonyClassroom.htm	http://www.natureshealing.info/health-harmonyclassroom-6/	[R=301,NC,L]
    Redirect	http://www.natureshealing.info/HerbalMedicine.htm	http://www.natureshealing.info/herbalmedicine-5/	[R=301,NC,L]
    # END My redirects
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Resolved] .htaccess’ is closed to new replies.
Skip to toolbar