Aidam-Unlimited
asked on
Mod Rewrite: script/var1/var2/var3 [three different files]
Hello,
I have following files:
script1.php
script2.php
script3.php
script1.php?s=ss&c=cc&p=al l
=
/script1/ss/cc/all
script2.php?s=ss&c=cc&d=dd &p=all
=
/script2/ss/cc/dd/all
script3.php?s=ss&c=cc&d=dd &cg=gg&p=a ll
=
/script3/ss/cc/dd/gg/all
Please, could somebody suggest me a Mod_Rewrite file for that?
Thank you in advance!
Adam
I have following files:
script1.php
script2.php
script3.php
script1.php?s=ss&c=cc&p=al
=
/script1/ss/cc/all
script2.php?s=ss&c=cc&d=dd
=
/script2/ss/cc/dd/all
script3.php?s=ss&c=cc&d=dd
=
/script3/ss/cc/dd/gg/all
Please, could somebody suggest me a Mod_Rewrite file for that?
Thank you in advance!
Adam
ASKER
Hi Addy, thanks for fast response.
I forgot to mention that variable values are changeable.
So everything what is fixed is script name and variable name, but variable value is always different.
For example, s=abc, s=jdcjsdcksn.
Thanks
I forgot to mention that variable values are changeable.
So everything what is fixed is script name and variable name, but variable value is always different.
For example, s=abc, s=jdcjsdcksn.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent, perfect. Thanks a lot!
RewriteRule ^script1/ss/cc/all$ script1.php?s=ss&c=cc&p=al
RewriteRule ^script1/ss/cc/all/$ script1.php?s=ss&c=cc&p=al
RewriteRule ^script2/ss/cc/dd/all$ script2.php?s=ss&c=cc&d=dd
RewriteRule ^script2/ss/cc/dd/all/$ script2.php?s=ss&c=cc&d=dd
RewriteRule ^script3/ss/cc/dd/gg/all$ script3.php?s=ss&c=cc&d=dd
RewriteRule ^script3/ss/cc/dd/gg/all/$
Hope this helps.
Addy