Quantcast
Channel: All Forums
Viewing all articles
Browse latest Browse all 28058

Creating a custom HTTP Module Vs Using Rewrite Module

$
0
0

Hi Guys,

I am still hesitating between creating a custom HTTP Module and using the IIS Rewrite Module 2.0 for redirecting URLs stored in a database. My table looks like to

OldURl, NewUrl, RedirectType, UseExactDestination, Excludesubdirectories
a.html b.html 301, Yes, Yes
1.html 2.html 302, Yes, Yes
1/a.html, 2/a.html, 301, No, No
...

Use Exact Destination - determines whether requests are redirected to the exact destination instead of relative to the destination, default True.
Exclude Subdirectories - determines whether only requests to content in the From directory are redirected and not requests to its subdirectories, default False.

So in those cases, I want to redirect a to b using a 301 permanent redirect, 1 to 2 using a 302 Temporary redirect, 1/[ANY PAGE].html to 2/[ANY PAGE].html etc. etc...

In order to get rules for 301 redirects only, then 302 redirects only etc etc I can create multiple stored procedure and create a rule for each possibility. What do you think about that? Do you have any advice, trick, existing rules that might help?

Thank you


Viewing all articles
Browse latest Browse all 28058

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>