1

I have over 2500 urls which is rewritten using mod_rewrite. They are as below:

^abc$ page.php?param1=poi&param2=xsd
^xyz$ page.php?param1=ljk&param2=qwe

Now if i pass additional parameters from the rewritten url, like,

domain.com/abc&extra=qwerty

i am unable to fetch them using the code below using

if($_GET['extra']<>''){
    $extra = $_GET['extra'];
}

Also, domain.com/abc&extra=qwerty is redirecting me to my 404 error page.

1
  • Please add your full mod_rewrite configuration. How you defined ^abc$ might be related. Did you use REQUEST_URI? What RewriteCond did you specify before (if any)? Commented Oct 28, 2017 at 19:47

1 Answer 1

2

use /abc?extra=qwerty and add QSA in your htaccess rules like this :

^abc$ page.php?param1=poi&param2=xsd [QSA]
^xyz$ page.php?param1=ljk&param2=qwe [QSA]
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.