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

  • Home
  • SEARCH
  • 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

Ask A Question

Stats

  • Questions 315k
  • Answers 315k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Don't be a hater. :-) By the way, I'm assuming… May 13, 2026 at 11:15 pm
  • Editorial Team
    Editorial Team added an answer This may help: http://www.fusioncharts.com/forum/Topic11190-33-1.aspx#bm11207 May 13, 2026 at 11:14 pm
  • Editorial Team
    Editorial Team added an answer I would try to: Make it configurable Load external stylesheets?… May 13, 2026 at 11:14 pm

Related Questions

Stack Overflowers: I have a search function on my company's website (based on .NET
I am building a site using code igniter. I am developing a custom product
I am building a EC system for a client, this client is selling second
I am building a multi language site I have a descriptions table that hold

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.