Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 292725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:12:23+00:00 2026-05-12T06:12:23+00:00

I am building a product catalog for a customer website under ASP.NET using .NET

  • 0

I am building a product catalog for a customer website under ASP.NET using .NET Framework 3.5 SP1. Each product has a part number and an OEM part number (all globally unique).

For SEO purposes I would like the OEM part number to be as close as possible to the actual domain name.

How do I build a routing rule that allows me to do this:

http://www.myDomain.com/oemPartNumber
http://www.myDomain.com/myPartNumber

while still being able to do this:

http://www.myDomain.com/welcome
http://www.myDomain.com/products
http://www.myDomain.com/services
http://www.myDomain.com/contact

I would also love to hear your other SEO suggestions (we are primarily interested in Google) if you have any.

Thanks.

IMPORTANT: This not an MVC site, so I don’t have controllers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:12:24+00:00Added an answer on May 12, 2026 at 6:12 am

    You should be able to specify something like http://www.mydomain.com/oempartnumber/oem and http://www.mydomain.com/mypartnumber/pn. There must be something in the url that allows you to choose the controller you want to use and further more allow you to distinguish between a part number and an oem part number (unless those are also unique against one another. If there will never be overlap between oem and pn then you could have http://www.mydomain.com/{partnumber}/pn.

    RouteTable.Routes.Add(new Route
    {
    Url = "[query]/pn",
    Defaults = new { controller="PartNumber", action = "Details" },
    RouteHandler = typeof(MvcRouteHanderl)
    });
    

    You could use some trickery with a route like this:

    routes.MapRoute(
        "Part number",
        "{partNumber}",
        new { controller = "Part", action = "Display" },
        new
        {
            partNumber = @"\d+" // part number must be numeric
        }
    );
    

    But the problem here is that an OEM part number that is not actually a part number (such as “ave-345”) would not match!

    UPDATE: In reading I noticed that you said “this is not an MVC site so I don’t have controllers!”…OH! That changes things. In that case you can check to see if the directory exists where you pass in http://www.mydomain.com/1234 and if not you can test it for a product number. This would have to be done in a HttpModule though so you can catch it before your page is executed. Then on the server side you can direct the page to http://www.domain.com/productdetails?pid=1234.

    Take a look here to understand that: http://www.15seconds.com/Issue/020417.htm

    For this you will have a class that inherits from IHttpModule. Then you can specify an Init method

    public void Init(HttpApplication application)
    {
        //let's register our event handler
        application.PostResolveRequestCache +=
            (new EventHandler(this.Application_OnAfterProcess));
    }
    

    This then points to your Applicaton_OnAfterProcess method:

    private void Application_OnAfterProcess(object source, EventArgs e)

    {
        HttpApplication application = (HttpApplication)source;
        HttpContext context = application.Context;
    
        ...
    

    Inside of here you can specify some rules about what you are looking for.

    I usually do something along the lines of

    if (!System.IO.File.Exists(application.Request.PhysicalPath)) //doesn't exist
    {
        //you test for your product ID here
        ...
        //if you find it stuff it into a ProductID variable for later...
    

    Once you isolate your product ID you can then rewrite the URL (server side) and direct the user to the proper productDetails.aspx page.

    context.RewritePath("~/products/productDetails.aspx?ProductID=" + ProductID.ToString());
    

    So while the user and google sees http://www.mydomain.com/1234 your application will see http://www.mydomain.com/products/productdetails.aspx?productid=1234 and you can code against it as usual.

    I hope this is what you were looking for instead!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Building a website using a PHP based Ecommerce product Magento. The problem I have
I am implementing an e-commerce website using django. The product catalog will be big
I'm building a product that will ship after .Net 4.0 is released. Is MEF
I'm building an e-commerce website. I have a Product and Order models. It's possible
I'm building a site that has products, each of which belongs to one or
My team is building a product that has a lot of components that rely
I'm building an auction website (in Python/Django). Users can provide URL's to their product
I am building a picture gallery, that uses this code to display each product
I'm building an e-commerce search and I am using Lucene.Net as my search engine.
WiX first timer here. I am building an installer for my product using WiX,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.