View Full Version : htaccess Redirect Help

03-16-2011, 07:22 PM

I have a dynamic URL which I have masked.

This is the clean URL:


The original URL with the query string is:


It all works fine. HOWEVER, for something else to work I need that last bit of the query (&a=uk) to become ?a=uk. So basically I need to replace the ampersand with a question mark.

So the final clean URL becomes:


Here's what I currently have in my htaccess that makes the current magic happen:

RewriteEngine On
RewriteRule ^driver-warehouse-([^-]*)$ /driver-courses.php?action=show&course_url=$1

PLEEEEASE can someone help me with this? I need to get this working! Thankyou!

03-16-2011, 08:16 PM
This has nothing to do with PHP, moving to apache configurations.
Add a QSA flag, that should work fine.

Wait a minute, this is backwards.
You don't rewrite to the seo type url, you do it the other way. That &a=uk is they way it is since its been explicitly declared as such somewhere, or passed that way from the browser.
So this may actually end up being a PHP issue afterall. How are you creating this url in the first place?

03-18-2011, 06:20 PM
Hi there,

It's been sorted now, it did just need a QSA flag! Thanks for your help!