If you are using ISAPI_Rewrite 3, your rule should look like this:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.{100} /Default.aspx [R=301,L]
質問
My real url looks like this:
localhost/shop.asp?product=100&name=Product-name&category=cellphones
My rewritten url looks like:
localhost/cellphones/product-name/product-name_100.aspx
I use Helicon URL Rewriter and what i need to do is this: If my rewritten URL exceeds 200 characters it should redirect to "Default.aspx" Is there a rewrite rule for this?
解決
If you are using ISAPI_Rewrite 3, your rule should look like this:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.{100} /Default.aspx [R=301,L]