2
votes
7answers
4k views

How do you configure Apache/PHP to accept slashes in query strings?

I have two Apache servers running PHP. One accepts forward-slashes in the query string and passes it along to PHP in the expected way, for example: http://server/index.php?url=http://foo.bar ...
5
votes
1answer
4k views

How can I match query string variables with mod_rewrite?

Suppose I have URLs with query string parameters like these: /index.php?book=DesignPatterns&page=151 /index.php?book=Refactoring&page=157 Using mod_rewrite, how can I redirect them to SES ...
0
votes
1answer
557 views

Redirect and rewrite with mod_rewrite

After asking this question: Clean URL's for search query? I tried something with mod_rewrite: RewriteCond %{QUERY_STRING} ^s=([a-z]+)$ [NC] RewriteRule / /s/$1? [NC,R=301,L] RewriteRule ...
2
votes
1answer
542 views

Apache2 redirect with query string escaped twice

Using this rule in a virtual host configuration file leads to double escaping of the query parameters: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} ...
2
votes
1answer
830 views

mod_rewrite {QUERY_STRING}

I'm sure that's been asked zillions times but i can't get it to work, i'm trying to rewrite a url with querystring, my url is for example: http://example.com/articles/index.php?keyword=book and i ...
2
votes
2answers
5k views

Rewrite Query String

I have this URL: oldsite.com/profile.php?uid=10 I would like to rewrite it to: newsite.com/utenti/10 How can I do that? UPDATE: I wrote this: RewriteCond %{QUERY_STRING} ^uid=([0-9]+)$ ...
0
votes
2answers
111 views

How to remove any query except `callback` for specific URLs with RewriteRule?

The current RewriteRule removes any query except query callback for any URL. # Remove question mark and parameters RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^?#\ ]*)\?[^\ ]*\ HTTP/ [NC] # Query ...
0
votes
1answer
210 views

URL Rewriting - Query String

I work on an MVC application and I have urls in the following format: http://127.0.0.1/PDO/PARTIE%20III/index.php?rt=index/connexion http://127.0.0.1/PDO/PARTIE%20III/index.php?rt=index/nouveauMsg ...