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. Technical SEO Issues
    4. What's with the redirects?

    What's with the redirects?

    Technical SEO Issues
    5 4 115
    • 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.
    • HeadStud
      HeadStud last edited by

      Hi there,
      I have a strange issue where pages are redirecting to the homepage.Let me explain - my website is http://thedj.com.au

      Now when I type in www.thedj.com.au/payments it redirects to https://thedj.com.au (even though it should be going to the page https://thedj.com.au/payments).

      Any idea why this is and how to fix?

      My htaccess file is below:


      BEGIN HTTPS Redirection Plugin

      <ifmodule mod_rewrite.c="">RewriteEngine On
      RewriteRule ^home.htm$ https://thedj.com.au/ [R=301,L]
      RewriteRule ^photos.htm$ http://photos.thedj.com.au/ [R=301,L]
      RewriteRule ^contacts.htm$ https://thedj.com.au/contact-us/ [R=301,L]
      RewriteRule ^booking.htm$ https://thedj.com.au/book-dj/ [R=301,L]
      RewriteRule ^downloads.htm$ https://thedj.com.au/downloads/ [R=301,L]
      RewriteRule ^payonline.htm$ https://thedj.com.au/payments/ [R=301,L]
      RewriteRule ^price.htm$ https://thedj.com.au/pricing/ [R=301,L]
      RewriteRule ^questions.htm$ https://thedj.com.au/faq/ [R=301,L]
      RewriteRule ^links.htm$ https://thedj.com.au/links/ [R=301,L]
      RewriteRule ^thankyous/index.htm$ https://thedj.com.au/testimonials/ [R=301,L]
      RewriteCond %{HTTPS} off
      RewriteRule ^(.*)$ https://thedj.com.au/ [L,R=301]</ifmodule>

      END HTTPS Redirection Plugin

      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

      RewriteCond %{HTTP_HOST} ^mrdj.net.au$ [OR]
      RewriteCond %{HTTP_HOST} ^www.mrdj.net.au$
      RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

      RewriteCond %{HTTP_HOST} ^mrdj.com.au$ [OR]
      RewriteCond %{HTTP_HOST} ^www.mrdj.com.au$
      RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

      RewriteCond %{HTTP_HOST} ^thedjs.com.au$ [OR]
      RewriteCond %{HTTP_HOST} ^www.thedjs.com.au$
      RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

      RewriteCond %{HTTP_HOST} ^theperthweddingdjs.com$ [OR]
      RewriteCond %{HTTP_HOST} ^www.theperthweddingdjs.com$
      RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

      RewriteCond %{HTTP_HOST} ^thedjs.net.au$ [OR]
      RewriteCond %{HTTP_HOST} ^www.thedjs.net.au$
      RewriteRule ^/?$ "https://thedj.com.au" [R=301,L]

      1 Reply Last reply Reply Quote 0
      • LesleyPaone
        LesleyPaone last edited by

        I am not the best with a htaccess without testing, but I think this is your trouble line

        RewriteCond %{HTTPS} off
        RewriteRule ^(.*)$ https://thedj.com.au/ [L,R=301]

        It is redirecting anything from non https to your home page.

        Martijn_Scheijbeler 1 Reply Last reply Reply Quote 2
        • Martijn_Scheijbeler
          Martijn_Scheijbeler @LesleyPaone last edited by

          Yes pretty sure as well that's the problem. Also the first line of all of them that got my interest.

          1 Reply Last reply Reply Quote 0
          • HeadStud
            HeadStud last edited by

            Hi guys,

            I was 100% sure you had found the issue however it is still happening.. I guess I'll have to ask my web developer.

            But just for the record - this is my updated file, I wasn't sure whether to comment out just the first line in question or both:

            BEGIN HTTPS Redirection Plugin

            <ifmodule mod_rewrite.c="">RewriteEngine On
            RewriteRule ^home.htm$ https://thedj.com.au/ [R=301,L]
            RewriteRule ^photos.htm$ http://photos.thedj.com.au/ [R=301,L]
            RewriteRule ^contacts.htm$ https://thedj.com.au/contact-us/ [R=301,L]
            RewriteRule ^booking.htm$ https://thedj.com.au/book-dj/ [R=301,L]
            RewriteRule ^downloads.htm$ https://thedj.com.au/downloads/ [R=301,L]
            RewriteRule ^payonline.htm$ https://thedj.com.au/payments/ [R=301,L]
            RewriteRule ^price.htm$ https://thedj.com.au/pricing/ [R=301,L]
            RewriteRule ^questions.htm$ https://thedj.com.au/faq/ [R=301,L]
            RewriteRule ^links.htm$ https://thedj.com.au/links/ [R=301,L]
            RewriteRule ^thankyous/index.htm$ https://thedj.com.au/testimonials/ [R=301,L]
            #RewriteCond %{HTTPS} off
            #RewriteRule ^(.*)$ https://thedj.com.au/ [L,R=301]</ifmodule>

            END HTTPS Redirection Plugin

            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

            RewriteCond %{HTTP_HOST} ^mrdj.net.au$ [OR]
            RewriteCond %{HTTP_HOST} ^www.mrdj.net.au$
            RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

            RewriteCond %{HTTP_HOST} ^mrdj.com.au$ [OR]
            RewriteCond %{HTTP_HOST} ^www.mrdj.com.au$
            RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

            RewriteCond %{HTTP_HOST} ^thedjs.com.au$ [OR]
            RewriteCond %{HTTP_HOST} ^www.thedjs.com.au$
            RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

            RewriteCond %{HTTP_HOST} ^theperthweddingdjs.com$ [OR]
            RewriteCond %{HTTP_HOST} ^www.theperthweddingdjs.com$
            RewriteRule ^/?$ "https://thedj.com.au/" [R=301,L]

            RewriteCond %{HTTP_HOST} ^thedjs.net.au$ [OR]
            RewriteCond %{HTTP_HOST} ^www.thedjs.net.au$
            RewriteRule ^/?$ "https://thedj.com.au" [R=301,L]

            1 Reply Last reply Reply Quote 1
            • MichaelC-15022
              MichaelC-15022 last edited by

              Comment out both.  The Rewrite Cond is the test condition that if satisfied, causes the rewriterule on the following line to be executed.

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              • Can anyone tell me - in layman's terms - any SEO implications of a Netscaler redirect?
                0
                1
                69

              • My old URL's are still indexing when I have redirected all of them, why is this happening?
                MonicaOConnor
                MonicaOConnor
                0
                8
                325

              • Test site got indexed in Google - What's the best way of getting the pages removed from the SERP's?
                Yarden_Uitvaartorganisatie
                Yarden_Uitvaartorganisatie
                0
                5
                1.3k

              • What's Moz's Strategy behind their blog main categories?
                Cyrus-Shepard
                Cyrus-Shepard
                0
                8
                279

              • Why can't I redirect 302 errors to 301's?
                Chris.Menke
                Chris.Menke
                0
                3
                80

              • What's the best way to handle Overly Dynamic Url's?
                GKLA
                GKLA
                0
                2
                309

              • I'm redesigning a website which will have a new URL format. What's the best way to redirect all the old URLs to the new ones? Is there an automated, fast way to do this?
                GregFindley.co.uk
                GregFindley.co.uk
                0
                2
                303

              • Website's stability and it's affect on SEO
                AlanMosley
                AlanMosley
                0
                2
                1.0k

              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