basic category url rewrite

Sep 27, 2009 at 3:45 AM

Hi there,

I'm trying to get a basic category rewrite url work,

my rewrite rule is this

# category redirects
RewriteRule ^/([^/]+)/ /Browse.aspx?Category.aspx=$1

That seems to work well, I want to redirect something like

I had to add a trailing slash redirect for it to be actually rewritten though (anyway around this, or not cause a response to be sent to the client only for the client to make another request)

# add a trailing slash
RewriteRule ^([^.?]+[^.?/])$ $1/ [R=301,L]

But I'm having a problem, all my css is getting screwed up, when I navigate too

instead of the css coming from "" it is coming ""

what is the best way to fix this?

i've tried

RewriteCond %{REQUEST_URI} ^*/*/
RewriteRule (.*)App_Themes/(.*) /App_Themes/$2 [R, NC]

But I seem to get stuck in a redirect loop, firebug show my css just constantly loading with a 302.  So i think i need to make a redirect if /App_Themes/ is only in a subdirectory and not directly off (and I dont want to use in the rules, since im running this on localhost atm)

I basically want to setup these rules

1. If Page exists, just return it

2. = redirect (masking redirect url) to

3. = redirect (masking redirect url) to (eg "")

4. = redirect (masking redirect url) to

Also do the rules continue processing one after another, or do they stop when a match is found.  if they continue, is there a way to make them stop?