Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9250589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:28:41+00:00 2026-06-18T10:28:41+00:00

I know this must have an answer somewhere around here, but I am unable

  • 0

I know this must have an answer somewhere around here, but I am unable to find/locate it.

There is a typical 301 redirection rule in the same domain:

Redirect 301 /path/to/strange-url.htm /path/to/new/canonical-url.htm

Later on htaccess file, there is a rewrite rule for the canonical-url

RewriteRule ^([^/]+)/([^/]+)([^/]+)/([^-]+)-([^.]+)\.htm$ php/page.php?var1=$1&var2=$2&var3=$3&var4=$4&var5=$5 [NC,L]

Problem is that as soon as the 301 redirect activates, my new url becomes:

/path/to/new/canonical-url.htm?var1=xxxx&var2=xxxx&var3=xxxx&var4=xxxx&var5=xxxx

How can I avoid this and maintain only the clean url: /path/to/new/canonical-url.htm ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:28:42+00:00Added an answer on June 18, 2026 at 10:28 am

    ok i finally found a working solution

    I changed all Redirect 301 rules to RewriteRule [R=301,L], so:

    Redirect 301 /path/to/strange-url.htm /path/to/new/canonical-url.htm
    

    becomes

    RewriteRule ^/path/to/strange-url.htm http://www.example.com/path/to/new/canonical-url.htm [R=301,L]
    

    Also, I have moved all former redirects before the actual rewrites

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know there must be a really simple answer to this question, but I
I know this answer must be out there, but I can't figure out how
I know this must be a n00b question, but I have to implement a
I know SQL well but I must be missing something really dumb here. This
I know this isn't strictly a programming question but y'all must have experienced this.
I know this question has been asked many times here, but no answer has
I'm sorry, i Know this must be a basic question, but i cant find
I know that somewhere in the history of the internet this must have been
I know that this question must have been asked and answered a million times,
I know this code use to work, I must have accidentally changed something when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.