Link to home
Start Free TrialLog in
Avatar of i-CONICA
i-CONICAFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Mod_rewrite QSA confusion

Hi,

I'm in need of a rewrite code, which I have, but it's not working as expected/needed.

What I need to do is rewrite

/index.php?var1=var1data
to
/var1data/

Which works, but also, it needs the ability to contiue this pattern further, so i could do
/index.php?var1=var1data&var2=var2data&var3=var3data etc...
giving me
/var1data/var2data/var3data/


Below is my existing code, I read that the QSA flag might be needed? But also, my example has predefined variable names, can it be done without knowing the variable names?

Thanks.
RewriteRule ^([^/]*)/$ /index.php?var1=$1

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of arober11
arober11
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of i-CONICA

ASKER

Hi, Thanks for the response.

I could use this but ideally, it'd work without knowing variable names in advance. Is that not possible?

Thanks again.