The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Vertical SEO: Video, Image, Local
    4. Wordpress, Redirects and HTacess file

    Wordpress, Redirects and HTacess file

    Vertical SEO: Video, Image, Local
    3 2 132
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jon-C
      Jon-C last edited by

      Converted site  to wordpress and having a bit of trouble with re-directs not redirecting.

      Could somebody tell me whether redirects go before the

      `# BEGIN WordPress`
      
      or after the 
      
      # END wordpress
      
      or immediately after this bit -
      
      <code># BEGIN WordPress
       <ifmodule mod_rewrite.c="">RewriteEngine On
      RewriteBase /</ifmodule></code>
      
      
      section of the code within my htacess file?
      
      Just wondered if this is the cause of my problems!
      
      Cheers
      Ted
      
      1 Reply Last reply Reply Quote 0
      • TakeshiYoung
        TakeshiYoung last edited by

        They would go after the #END wordpress line. You can also install the plugin called "Redirection" which will allow you to put in 301 redirects without mucking about with your .htaccess file.

        Jon-C 1 Reply Last reply Reply Quote 0
        • Jon-C
          Jon-C @TakeshiYoung last edited by

          Hi Takeshi,

          I only need to get 2 redirects working, so I thought a plug in was a bit overkill.

          They are already present in the htaccess file from the previous site (I'm running wordpress from a sub-folder but switched everything over as per the wordpress instructions.

          Got the following which doesn't seem to work (any ideas what is wrong?)

          RewriteCond %{HTTP_HOST} ^example.co.uk$ [OR]
          RewriteCond %{HTTP_HOST} ^www.example.co.uk$
          RewriteRule ^/?$ "http://www.newsite.co.uk" [R=301,L]

          The above should redirect from example.co.uk OR www.example.co.uk

          to www.newsite.co.uk

          and the is that is giving me a few problems is

          RewriteCond %{HTTP_HOST} ^newsite.co.uk$ [OR]
          RewriteCond %{HTTP_HOST} ^www.newsite.co.uk$
          RewriteRule ^oldpage.htm$ "http://www.newsite.co.uk/new-page.htm" [R=301,L]

          That should redirect from newsite.co.uk/oldpage.htm

          to newsite.co.uk/new-page.htm

          All these are already existing redirects done previously through my htaccess file but not too sure if the coding is correct for a wordpress based site but the last one above does not seem to be working at all!

          Any ideas would be great and a big help!

          Cheers
          Ted

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          • Redirecting photos during site redesign?
            GlobeRunner
            GlobeRunner
            0
            2
            93

          • What's better for SEO an Optimized Image URL vs Optimized Image File Name?
            Martijn_Scheijbeler
            Martijn_Scheijbeler
            0
            4
            192

          • Best Video Sitemap plugin for wordpress? And do I need both a video sitemap and a normal one?
            PhilNottingham
            PhilNottingham
            0
            8
            6.1k

          • WordPress image file names SEO question
            StephenWeigel
            StephenWeigel
            0
            7
            1.2k

          • Wordpress Image Embed
            Delete2012
            Delete2012
            0
            2
            303

          • 301 redirect .com to .co.uk to improve position in UK serps
            Hannah_Smith
            Hannah_Smith
            0
            3
            495

          • 301 Redirect affects Google Places Listing?
            InTouchMarketing56
            InTouchMarketing56
            0
            5
            823

          • Self Hosting Videos in Wordpress
            wparlaman
            wparlaman
            0
            8
            1.7k

          Get started with Moz Pro!

          Unlock the power of advanced SEO tools and data-driven insights.

          Start my free trial
          Products
          • Moz Pro
          • Moz Local
          • Moz API
          • Moz Data
          • STAT
          • Product Updates
          Moz Solutions
          • SMB Solutions
          • Agency Solutions
          • Enterprise Solutions
          • Digital Marketers
          Free SEO Tools
          • Domain Authority Checker
          • Link Explorer
          • Keyword Explorer
          • Competitive Research
          • Brand Authority Checker
          • Local Citation Checker
          • MozBar Extension
          • MozCast
          Resources
          • Blog
          • SEO Learning Center
          • Help Hub
          • Beginner's Guide to SEO
          • How-to Guides
          • Moz Academy
          • API Docs
          About Moz
          • About
          • Team
          • Careers
          • Contact
          Why Moz
          • Case Studies
          • Testimonials
          Get Involved
          • Become an Affiliate
          • MozCon
          • Webinars
          • Practical Marketer Series
          • MozPod
          Connect with us

          Contact the Help team

          Join our newsletter
          Moz logo
          © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
          • Accessibility
          • Terms of Use
          • Privacy