views:

71

answers:

2

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

The problem is: http://mydomain.com/somedir/somephp.php?arg1=value&arg2=http://otherdomain.com&arg3=http://othertoo.com/somepath/something... totally fails. With and without url encode.

My site reads in everything after mydomain.com/everything, 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:

Forbidden

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 I'm sure the url in the url argument makes this error.

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

Please help me! Thanx!

A: 

You could try encoding it with base64:

http://www.webtoolkit.info/javascript-base64.html

then decode it in the application.

Deefjuh
but the response (the callback) came from the openId provider,ex: google or yahoo. So I cant do anything with the callback url, Im just getting it.
pinusnegra
+2  A: 

I faced exactly the same problem. here

You will need to contact your hosting service provider. There are some rules that are conflicting with their .htaccess rules. So request them to whitelist your site from such rules.

Don't forget to include a url of the problem while reporting the issue to your webhosting provider.

I am pretty much sure that your problem will be solved once your site has been added to the whitelist of your service provider security rules.

My problem was solved when I reported the issue to my website hosting provider.

Gaurav Sharma