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. On-Page / Site Optimization
    4. Apache .htaccess query string redirects

    Apache .htaccess query string redirects

    On-Page / Site Optimization
    4 3 239
    • 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.
    • vmialik
      vmialik last edited by

      With regular redirect(s) the following URLs did not work, any ideas for the .htaccess code to make this work?

      http://www.domain.com/?view=featured redirect to http://www.domain.com/

      http://www.domain.com/contact-us.html?view=message&layout=message&pf=1&redirect_on_success= to http://www.domain.com/contact-us.html

      and

      http://www.domain.com/login.html?return=aW5kZXgucGhwP29wdGlvbj1jb21fcGhvY2Fkb3dubG9hZCZ2aWV3PWNhdGVnb3J5JmlkPTEyOmNvbWJpbmUtZXZhbHVhdGlvbiZJdGVtaWQ9NzM4 to http://www.domain.com/login.htm

      Thanks guys! 🙂

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

        Hi Vadim,

        I am not providing you exact 301 redirect code for above URL but I have found a detailed article posted on this post that might be helpful for you but not very sure.

        http://www.goinflow.com/setting-up-301-redirects-for-dynamic-urls/

        Hope this helps.

        Thanks

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

          Hi Vadim

          Did you have any luck with this? I found a few resources that might help (I don't have intimate experience with writing special .htaccess redirects):

          • http://stackoverflow.com/questions/20658268/htaccess-301-redirect-for-url-with-parameter
          • https://gist.github.com/ScottPhillips/1721489
          • http://webmasters.stackexchange.com/questions/61227/changing-from-parameter-to-readable-urls-301-redirect
          vmialik 1 Reply Last reply Reply Quote 0
          • vmialik
            vmialik @evolvingSEO last edited by

            Hi Dan,

            Thanks for this! I had initially asked and then without getting an answer had to go dig around and figure this out myself. At the end of the day I made it happen!

            Thanks for looking through this again. Ill mark it as answered!

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            • 301 Redirects - Large .htaccess file question
              MrWhippy
              MrWhippy
              0
              3
              85

            • Redirect and Redirect Error in Moz Crawl
              andy.bigbangthemes
              andy.bigbangthemes
              0
              4
              49

            • Query string parameters and canonical links
              Shawn_Huber
              Shawn_Huber
              0
              4
              2.6k

            • How can I fix multiple 404 errors with Wildcard htaccess redirect
              Taiger
              Taiger
              0
              12
              4.3k

            • Redirection
              Aleyda
              Aleyda
              0
              3
              144

            • 302 redirect (temporary redirect)
              Shanaki
              Shanaki
              0
              8
              1.4k

            • Redoing a site - 404 redirect or 301 redirect
              danatanseo
              danatanseo
              0
              3
              536

            • How do I do a 301 Redirect in IIS 7 from http://www.freightmonster.com/index.html to http://freightmonster.com/index.html when I don't have a physical page to redirect?
              EricaMcGillivray
              EricaMcGillivray
              0
              4
              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