Welcome to MSFN

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.


Sign in to follow this  
Followers 0
skukstr

Apache URL Rewriter - QSA Flag Problem

2 posts in this topic

Hey folks,

First time poster here... looks like a great community! I'm having an issue with the Apache URL Rewriter module. The web app that I'm building needs URLs to be converted from this format:

/My.Class?Arg1=x&Arg2=y

To this format:

/index.php?Class=My.Class&Arg1=x&Arg2=y

My rewrite rule looks like this:

RewriteRule ^(.*)$ index.php?Class=$1 [QSA]

Now the odd part is, this actually works... but my PHP script ends up receiving two copies of the 'Class' argument. I had my PHP script print out the exact query string for analysis:

/index.php?Class=index.php&Class=My.Class&Arg1=x&Arg2=y

I'm absolutely baffled as to why the rewrite engine is appending another Class argument on to the URL... and why in the world it's equal to 'index.php'. All I can think is that maybe I misunderstood the functionality of QSA. Any ideas?

Thanks in advance!! :thumbup

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.