I am attempting to pass an URL like a parameter in mod-rewrite. I suppose there's an issue during my Regex. This my .htaccess:
<IfModule mod_rewrite.c> RewriteEngine on RewriteRule **^go/((http:\/\/)+[A-Za-z0-9\-]+[\.A-Za-z])/?$** feedmini.php?url=$1 [L] </IfModule>
the URL I wish to pass appears like http://www.aaaa.com/aaa/?q=v however when ever I attempt to achieve it on go/http://www.aaaa.com/aaa/?q=v I recieve an 404 error page. I have also attempted with
**^go/([A-Za-z0-9\-\/:]+[\.A-Za-z]+)/?$** however the URL i pass will get such as this: http:/www.aaaa.com/aaa/ (take notice of the singel '/' after 'http:')
Thanks ahead of time /Ale
Well the first problem (inside your first code block) is your Regex pattern won't match a URL because it is only going to match a string that starts with http:// then consists of only alphanum or dashes, which finishes having a single fullstop or letter. Possibly this is just a typo and there must be a quantifier inside, but nevertheless it might neglect to match a really large percentage or Web addresses.
This might appear strange, but do this...
RewriteRule ^go/http:/(.*)/?$ feedmini.php?url=http://$1 [R=302,L]