Hey guys i dont know what i’m doing wrong here.
http://www.example.com/data/stuff1/stuff2/stuff3
to
http://www.example.com/anything.php?par1=data&&par2=stuff1/stuff2/stuff3
And this is what i had written. Please help me out figure out my mistake.
Ps. I’m very new to .htaccess.
Thanks!
RewriteEngine On # Turn on the rewriting engine
#RewriteCond %{REQUEST_URI} !www\.a3k\.in
RewriteRule /([^/]+)/?(.*)$ /anything.php?api=$1&&data=$2 [NC,L]
The path in a
RewriteRuledoes not contain a preceding slash, and because you didn’t add a^to mark the beginning of the path, this may have caused a wrong behavior. So try this instead:Additionally I added a
RewriteCond %{REQUEST_FILENAME}to make sure that URLs of actually existing files won’t be rewritten.