Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

More mod_rewrite help.

Posted on 2005-03-07
3
Medium Priority
?
215 Views
Last Modified: 2010-03-04
I asked a questions here:
 http://www.experts-exchange.com/Web/Web_Servers/Apache/Q_21317308.html

I got an answer, here is what I am using:
RewriteEngine on
Options +FollowSymlinks
RewriteRule ^index\.php - [L]
RewriteRule ^([^/]+)/([^/.]+)/?$ /new/index.php?d=$1&p=$2 [L]

Now, I need to be able to have the URL like this: http://company.com/new/variable/variable/?foo=a

when I try that the foo=a is never recognized. Is there a simple way to make the URL query come into the rewrite rule.
0
Comment
Question by:ssammons
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
caterham_www earned 1000 total points
ID: 13480430
add the QSA-Flag:

RewriteEngine on
Options +FollowSymlinks
RewriteRule index\.php - [L]
RewriteRule ^([^/]+)/([^/.]+)/?$ /new/index.php?d=$1&p=$2 [L,QSA]
0
 
LVL 27

Expert Comment

by:caterham_www
ID: 13480498
the result of the flag is that the querystring from the request (foo=a) is not replaced by the substitution but added to the substitution.

So you'll get /new/index.php?d=variable1&p=variable2&foo=a in this example
0
 
LVL 4

Author Comment

by:ssammons
ID: 13480520
Yep thanks exactly what I needed. I read right over that in the docs...just spelled out too kryptically for my brain power :P I live for examples thanks!
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Integration Management Part 2
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month11 days, 23 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question