Forum Moderators: phranque
For example :
[example.com...]
I'd like to pass everything after /widgets/ into a query string using Mod ReWrite.
Any ideas as to how this can be done?
-panic
[webmasterworld.com...]
Here, Alternative_Future is asking for a way to go from 1 to 2 like this:
1) [mydomain.com...]
2) [mydomain.com?country=scotland&type=tour&area=grampian&town=buckie...]
Part of the answer involves PHP scripting, but there's also an option suggested that involves "RewriteMap" in stead. Check it out, i hope it helps.
/claus
example.com/cgi-bin/retrive/param1/value1/param2/value2/ example.com/cgi-bin/retrive.cgi?param1=value1¶m2=value2 If you aren't using ScriptAlias'ed cgi script as a destination, take the the [PT] flag out. So, here it goes:
RewriteRule (.*/retrieve[^&]*)/([^/]+)/([^/&]+)(.*) $1&$2=$3$4 [N]
RewriteRule (.*/)retrieve&([^/]*) $1retrieve.cgi?$2 [PT]
Here's what I've got in my .htaccess :
RewriteEngine on
RewriteRule ^(.*)/$ output.php?querystring=$1 [L]
Then, in output.php, I split $querystring by "/", then I do my queries/manipulation/etc.
Thanks for everyone's help!
-panic