Need help with RewriteRule

Topics: User Forum
Mar 18, 2010 at 8:08 PM
Edited Mar 18, 2010 at 8:18 PM

I need to be able to take a URL like 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: 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 '' ==> '
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.

Mar 19, 2010 at 1:44 PM

OK, I think I'm good now.  I found the example I needed in the SearchEngineFriendly folder under tests.

Mar 19, 2010 at 7:25 PM

ah, great, glad you found it.