Mar 18, 2010 at 9:08 PM
Edited Mar 18, 2010 at 9:18 PM
I need to be able to take a URL like
http://www.server.com/cooking/eggs/ and get to
I know I don't want to redirect since this will be for SEO purposes. What I have so far is: RewriteRule (https?)://([^/]+)/([^/]+)(/([^\?]+(\?(.*))?)?)? $1://$2/?type=$3&what=$5
I got the regular expression from the documentation. It worked better than what I had. I seem to be having problems converting the folder names to parameters. It was creating:
http://www.server.com/cooking/eggs/?type=cooking&what=eggs which is why I added the scheme and server to the regular expression. The documentation has led me to believe I should use RewiteCond for
that part. I couldn't figure that out though. So, do I need both RewriteCond and RewriteRule or can this be done just using RewriteRule? My final result now is: REWRITE 'http://www.server.com/cooking/eggs/' ==> 'http://www.server.com/?type=?
t=&what=&what=&what=&what=&what=' using TestDriver
The depth seems to be going past 8 so I'm missing the final what= not to mention the repeating. Even when I altered the IterationLimit above 8 it didn't help.