문제

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]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top