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 9270463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:22:36+00:00 2026-06-18T15:22:36+00:00

Example: 1) URL (a poorly constructed one) is already indexed by Google: www.abc.com/index.php?product=zzz 2)

  • 0

Example:

1) URL (a poorly constructed one) is already indexed by Google:
http://www.abc.com/index.php?product=zzz

2) The URL is rewritten by using the following rewrite rule:
RewriteRule ^zzz$ index.php?product=zzz [L,NC]

The above is working fine, but we want to tell Google that the page has permanently moved from the URL in (1) URL http://www.abc.com/index.php?product=zzz to the URL in (2) http://www.abc.com/zzz

3) So now we apply the following rule above the rule (2):
RewriteCond %{QUERY_STRING} ^product=zzz [NC]
RewriteRule index http://www.abc.com/zzz? [L,R=301]

This results in an infinite loop. How do we tell Google that our site has changed from http://www.abc.com/index.php?product=zzz to http://www.abc.com/zzz? Or will Google do this by themselves?

—–Current full htaccess rules resulting in infinite loop:—–

RewriteCond %{QUERY_STRING} ^product=zzz [NC]
RewriteRule index http://www.abc.com/zzz? [L,R=301]

RewriteRule ^zzz$ index.php?product=zzz [L,NC]

  • 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-18T15:22:37+00:00Added an answer on June 18, 2026 at 3:22 pm

    Replace your existing rules with this code:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+index\.php\?product=([^\s&]+) [NC]
    RewriteRule ^ /%1? [R=301,L]
    
    RewriteRule ^(zzz)/?$ /index.php?product=$1 [L,NC,QSA]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I find Google Alert feed url for specific keyword? Example URL: http://www.google.com/reader/view/?hl=tr#stream/user/13172112245289928208/state/com.google/alerts/10573968695315493577
I have an edit page with url example.com/product/edit/11 Now if the validation is false
This is my ajax code, For example URL 1 : www.text1.com and URL 2
Here's an example URL: http://www.motherjones.com/mojo/2012/05/reince-priebus-lgbt-workplace-discrimination The above used to pull in no image, title
I've been getting force closes opening url's that end in .jhtml Example URL: http://www.mtv.com/news/articles/1691428/beck-hansens-song-reader-sheet-music-album.jhtml
I am using Beautiful Soup in Python. Here is an example URL: http://www.locationary.com/place/en/US/Ohio/Middletown/McDonald%27s-p1013254580.jsp In
Based on the following example URL structure: mysite.com/mypage.aspx?a=red&b=green&c=blue Pages in the application use ASP.net
I have this URL example.com/photo?people I want to rewrite this URL in the form
When I look at my website using the url example.com I get something like
Example url: http://p.static.com/i/logo.jpg I want to be able to extract the urls from my

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.