I am trying to read all characters after .com/ and mod_rewrite them as a single variable that i can use php to $_GET['']. This is what I have so far.
This works great except it doesnt allow me to read '?' characters. I have a feeling that I need the htaccess file to read the entire url (or after .com/) and encode all characters so it is URL safe.
does anyone know how to do that with htaccess?
examples
with the above htaccess, if i goto
www.mydomain.com/testing/this/htaccess/
the $_GET['user'] will = 'testing/this/htaccess/'
however, if i goto this url
www.mydomain.com/testing/this/?htaccess/
the $_GET['user'] will = 'testing/this/'
is there a way i can have htaccess read all characters, or convert the ?'s to encoded_url chars?
Code:
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)$ index.php?user=$1 [qsa]
does anyone know how to do that with htaccess?
examples
with the above htaccess, if i goto
www.mydomain.com/testing/this/htaccess/
the $_GET['user'] will = 'testing/this/htaccess/'
however, if i goto this url
www.mydomain.com/testing/this/?htaccess/
the $_GET['user'] will = 'testing/this/'
is there a way i can have htaccess read all characters, or convert the ?'s to encoded_url chars?
Last edited: