I have read really everything about RewriteRules within the last days. You're my last measure :D
I simply cam't get almost anything to work (yes, Rewrite Engine is on and straightforward stuff works).
My website URL appears like this:
I would like an effect such as this
There you have it. I really hope some genius here can provide us a nudge within the right direction.
Thanks all Oliver
The final recipe on http://wiki.apache.org/httpd/RewriteQueryString is where to begin. Within the specific situation you've pointed out above, you would make a move like:
RewriteRule ^/?([^\]+)/([^\]+)/([^\]+)/? /?platform=$1&setfilter=$2&dates=$3
You will find two rather apparent issues with this solution however. They're:
how can we map "cost" to "1" and "nextweek" to "2"? Possibly this really is something your handler/script/whatever must be made wise enough to complete
Other URIs in your site (images, css, js, whatever) can also be caught with this ruleset, which might break stuff.
These two conditions might be solved by:
- Making the script wise enough to handle arguments and
- Avoid using mod_rewrite whatsoever. Rather, use:
(or whatever your root handler/script is known as) and getting that script/handler directly manipulate PATH_INFO smartly.
Remember, the most crucial factor about mod_rewrite is understanding when you should cure it.
This can be used generic rule to rewrite the second URL road to the previous one:
RewriteRule ^/([^/]+)/([^/]+)/([^/]+)/$ /?platform=$1&setfilter=$2&dates=$3