Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hey everybody, Im really confused about this problem. Ill try to describe it:

The problem is: is totatlly fails. With url encode and without too.

My site read in everything after, except files and directories which are exists. I'm doing it with mod_rewrite:

Options -Indexes 

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ handler.php

The query example above is landing at handler.php. If I comment out the RewriteRule, there will be an apache error:


You don't have permission to access /somedir/somephp.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Lots of testing etc, Ive figured out that there is a problem with the http://, or :// string in the url arguments. But its coming in url encoded :S

This stuff should be an openId authentication system, and its fails at the postback, and Im sure the url in the url argument makes this error.

I never meet this problem before, altought, I did a lot of same thing. The url encode thing must work.

Please help me! Thanx!

share|improve this question

what means "totally fails"? what error code do you goet? what error in your server file? what shows up?

your rewrite rules are fine! the permission error doesnt matter as its not the file you want to serve, as long as handler.php is accessible.

however i think your error is that the config above is not exactly the one you tried. if you have it like this:

RewriteRule ^(.*)$ handler.php?a=b

you will loose ally our query string arguments, because its overwritten by a=b. what you then can do is the following:

RewriteRule ^(.*)$ handler.php?a=b [QSA]

which tells apache to append your query string (QSA=QueryStringAppend)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.