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

  • Home
  • SEARCH
  • 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 7943265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:13:14+00:00 2026-06-04T00:13:14+00:00

I need this logic to work: I want rewrite this string for users to

  • 0

I need this logic to work:

I want rewrite this string for users to see

http://mysite.com/index.php?cl=mykeystring
to
http://mysite.com/otherkey/

http://mysite.com/index.php?myvar=test&cl=mykeystring&mysecondvar=morevalue
to
http://mysite.com/otherkey/myvar=test&mysecondvar=morevalue

But when http://mysite.com/otherkey/ is written, so load
http://mysite.com/index.php?cl=mykeystring, but no redirects will be done.

Is it possible? There are no possibility to change anything in codes, but only .htaccess

This logic is nearly realized by this code:

RewriteCond %{QUERY_STRING} ^(.*?)cl=mykeystring(.*?)$ [NC]
RewriteRule ^index.php$ /otherkey/%1%2? [R,L]

RewriteRule ^otherkey/(.*?)$ /index.php?cl=mykeystring&$1

but im getting some not needed amp symbols on first rewrite rule. any solutions?

  • 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-04T00:13:16+00:00Added an answer on June 4, 2026 at 12:13 am

    I think you can do something like this:

    RewriteCond %{QUERY_STRING} cl=mykeystring [NC]
    RewriteRule ^index.php /otherkey/ [QSA]
    

    Docs here: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

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

Sidebar

Related Questions

All I need this for is strcpy(). I want to see whether the first
i have this code, and need help with the logic end. I would like
I want to program this algorithms in Prolog, and first I need to create
I need some help figuring out this for loop logic. I know exactly what
I really need help on this one. I am having a simple login form
We need to secure a multi-langual web application with SSL (registration, login,..). However, this
I need this for some animation effects and i remember there is a window
I need this for calling a C function from Java class (JNI) and I
I need this because the constructor in the superclass is calling a method which
I need this roadmap of a Hibernate managed object instance. First, I create an

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.