I'm using PHP on a GoDaddy (cheap, temporary) server. My site is example.com, and I need to be able to handle URLs like this:
http://example.com/http://www.somedomain.com/somepage.html?param=something
Except, I usually get a 404 when I try to load a URL like this. Sometimes, it works, I don't know why. The PHP script at /index.php takes the entire URL and parses it the way I want. The problem is I usually can't even get to that point because I get a 404.
With a question mark in the path (immediately after example.com/, it loads the script which takes care of everything, and it works as expected:
http://example.com/?http://www.somedomain.com/somepage.html?param=something
I guess I need to do some magic in the .htaccess to make it work without the question mark but none of the twenty mods I've made to it so far has worked.
Can anyone help me please?
Thanks,
Paul
EDIT: Here's the latest incarnation of my .htaccess:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f [OR]
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^ - [L]
RewriteRule ^([^\s]+)\s([^\s]+)(\s.*)?$ $1+$2$3 [L]
RewriteRule ^([^\s]+)\s $1 [L]
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://example.com/?$1 [P,L,QSA]