I have searched everywhere for this answer, and the answers that have been posted do not fit my specific situation as it gives me 404 errors, and I'm not sure why.
I am trying to rewrite this: /c.php?url=http://www.example.com
Into this: /c/http://www.example.com
Right now I have this in my mod_rewrite:
RewriteEngine on
RewriteRule ^c/(.*)(/)?$ /c.php?url=$1
But when it rewrites the url that I am trying to send into the PHP script, it writes "http:/example.com
", with one slash instead of the double slash.
I've seen a lot of things posted about this involving the THE_REQUEST rule, but when I try to apply them to my htaccess file, they fail. I am not sure what is wrong, any help would be much appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…