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. Web Design
    4. WordPress and Redirects

    WordPress and Redirects

    Web Design
    14 4 149
    • 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.
    • Travis_Bailey
      Travis_Bailey @Travis_Bailey last edited by

      Curly brackets between the unlink and bold portions of the kitchen sink. Apparently you have to make sure you've said what you need to say, because I couldn't find a way to intuitively shut off the block and type.

      WilliamKammer 1 Reply Last reply Reply Quote 1
      • RobDalton
        RobDalton last edited by

        Thanks for the feedbacks.  I tried the above code.  I also tried a few at the website above and did not have any luck.  Just to confirm what I am trying to do......Take a page like www.waikoloavacationrentals.com/kolea-rentals/9g.html.  If someone types in www.waikoloavacationrentals.com/kolea-rentals/9g I want it to go to www.waikoloavacationrentals.com/kolea-rentals/9g.html so that they do not get a blank page.  It was happening on my old site, but not having the same luck with wordpress.  Thanks again!

        WilliamKammer 1 Reply Last reply Reply Quote 0
        • WilliamKammer
          WilliamKammer @RobDalton last edited by

          The code above will do the opposite.

          domain.com/page.html will become domains.com/page

          Did you test for that? Usually this is how people prefer their URLs to be, and if they type in the .html, they'll still get to the page.

          1 Reply Last reply Reply Quote 0
          • WilliamKammer
            WilliamKammer @Travis_Bailey last edited by

            Thanks! Although, yeah, not very easy to play with.

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

              Yes.  I am not getting anything on www.waikoloavacationrentals.com/kolea-rentals/9g

              I don't really care which way the rule goes just as long as when they put in either url they get something.

              Here is the code incase I typo'd something.

              <ifmodule mod_rewrite.c="">RewriteEngine On
              RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.).html\ HTTP/
              RewriteRule .
              http://www.waikoloavacationrentals.com/html/%1 [R=301,L]
              RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.)\ HTTP/
              RewriteRule .
              %1.html [L]</ifmodule>

              WilliamKammer 1 Reply Last reply Reply Quote 0
              • WilliamKammer
                WilliamKammer @RobDalton last edited by

                don't put your URL in for line 4, keep it as "localhost" like in the example.

                RobDalton 1 Reply Last reply Reply Quote 0
                • RobDalton
                  RobDalton @WilliamKammer last edited by

                  That is what I originally had.  I put it back.

                  <ifmodule mod_rewrite.c="">RewriteEngine On
                  RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.).html\ HTTP/
                  RewriteRule .
                  http://localhost/html/%1 [R=301,L]
                  RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /html/(.)\ HTTP/
                  RewriteRule .
                  %1.html [L]</ifmodule>

                  Try clicking on www.waikoloavacationrentals.com/kolea-rentals/9g and you will see what happens.  Thanks,

                  WilliamKammer 1 Reply Last reply Reply Quote 0
                  • WilliamKammer
                    WilliamKammer @RobDalton last edited by

                    Mind PMing me your. Htaccess?

                    RobDalton 1 Reply Last reply Reply Quote 0
                    • RobDalton
                      RobDalton @WilliamKammer last edited by

                      I sent it over.

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

                        Still no luck on this one if anyone else has any insight.

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

                          Pages load correct at: http://www.waikoloavacationrentals.com/kolea-rentals/9g.html

                          And do not load at: http://www.waikoloavacationrentals.com/kolea-rentals/9g

                          So you need to Redirect http://www.waikoloavacationrentals.com/kolea-rentals/9g TO http://www.waikoloavacationrentals.com/kolea-rentals/9g.html

                          You can do this with the line of code in .htaccess

                          Redirect 301 /kolea-rentals/9g http://www.waikoloavacationrentals.com/kolea-rentals/9g.html

                          Let us know if that works?

                          You can also try the redirect plugin, although personally I prefer using .htaccess for redirects

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post
                          • Does redirecting the existing URLs in the website without reducing our current rankings? The new website runs on the bubble, so it seems there is no provisions to redirect the existing URLs to this platform?
                            0
                            1
                            51

                          • WordPress redirects are taking too long to navigate: Anyone ever faced this?
                            Nigel_Carr
                            Nigel_Carr
                            0
                            2
                            39

                          • Should I Redirect Pagination?
                            Bigb06
                            Bigb06
                            0
                            2
                            521

                          • Help with redirects
                            Dr-Pete
                            Dr-Pete
                            0
                            4
                            154

                          • Redirecting Images
                            Tinhat
                            Tinhat
                            0
                            3
                            260

                          • Type of redirect?
                            RyanKent
                            RyanKent
                            0
                            12
                            1.2k

                          • Javascript Redirects
                            CoolSEOnStuff
                            CoolSEOnStuff
                            0
                            3
                            1.3k

                          • Redirecting 301 Redirects -- Will Search Engines Notice?
                            bemcapaz
                            bemcapaz
                            0
                            3
                            870

                          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