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 7736725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:48:51+00:00 2026-06-01T07:48:51+00:00

People, I am in developing an asp.net website with a Multilanguage content and SEO

  • 0

People, I am in developing an asp.net website with a Multilanguage content and SEO is a very high priority.

I have managed to get my website to display different URLs through asp.net URL routing to display site.com/ar and site.com/en depending on the selected language and this works fine on .apsx page on the root directory. However, this does not work in pages in subdirectories for example site.com/en/Account/Login.aspx and I have spent days trying to make my URL routing to work with my subdirectories but I was not able to get it to work with subdirectories.

So, from the-easy-way point of view is it better to have different physical directories /ar and /en on my root directory with different content pages for each language. This is also preferred since the layout for /ar page are completely flipped horizontally because ar = Arabic = right to left language.

Please do share your opinions on the advantages disadvantages of this approach.

  • 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-06-01T07:48:53+00:00Added an answer on June 1, 2026 at 7:48 am

    The URL based approach should work correctly even on subdirectories. Because you mention “subdirectories” rather than “controllers/actions” I assume you have your application implemented with ASP.NET WebForms rather than the MVC.

    If this is so, you url rewrite your requests in your Application_BeginRequest:

       public void Application_BeginRequest( object sender, EventArgs e )
       {
            HttpApplication app = (HttpApplication)sender;
            HttpContext ctx = app.Context;
    
            string PathAndQuery = ctx.Request.Url.PathAndQuery;
    
            // parse the PathAndQuery and if it is of the form
            // en/Subdir1/Subdir2/resource.aspx
            // split it into [en] (virtual part) and [Subdir1/Subdir2/resource.aspx] (physical part)
    
            string VirtualPart  = GetVirtualPart( PathAndQuery );
            string PhysicalPart = GetPhysicalPart( PathAndQuery );
    
            ctx.RewritePath( PhysicalPart );
       }
    

    With such approach, you have your physical structure in the filesystem and requests of the form en\Subdir1\Subdir2\resource.aspx are correctly routed to Subdir1\Subdir2\resource.aspx.

    Although the example shows manual rewriting, you can use any existing rewriting technology if it fits your needs.

    This is just to get you started. However, if you have any specific issues in your implementation of the url rewriting, I assume you’d have to ask other specific questions so that people can help you out with specific problems. If you just say I’ve spent days and it does not work then it is impossible to help you with your specific approach.

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

Sidebar

Related Questions

I am developing a blog site in asp.net 3.5 with C#. I have written
I get this error repeatedly when developing ASP.Net applications: Cannot create/shadow copy 'XXXXX' when
I am developing a website in ASP.NET MVC, using the latest IE and Chrome
People have been developing own solutions to the following problems: Consistent messaging frameworks for
I am currently developing a very simple database that tracks people and the company
There are several people about (myself being one of them) who have been developing
I'm hoping people have some ideas to help solve this problem. I am developing
I've been developing an ASP.NET site on an older machine running XP home. I
I have an application/phone which I am developing to be given to people who
I am currently developing an online Auction system using ASP.NET 3.5 and SQLServer 2008.

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.