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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:49:30+00:00 2026-06-08T11:49:30+00:00

IF this is my url http://localhost:55070/Server/1-Server A link in that page will became http://localhost:55070/Server/2-Instance_12

  • 0

IF this is my url http://localhost:55070/Server/1-Server

A link in that page will became

http://localhost:55070/Server/2-Instance_12

If I change the URL like this http://localhost:55070/Server/1-Server/

the link will be like this .http://localhost:55070/Server/1-Server/1-Instance_11

I want seconde type (http://localhost:55070/Server/1-Server/1-Instance_11/) always. If the user enters the URL like this http://localhost:55070/Server/1-Server it may cause some issues.

If this is the URL http://localhost:55070/Server/1-Server how can I append / to this http://localhost:55070/Server/1-Server/. So the links in next views are also append to it.

It is possible for user to remove the ‘/’ and then also i need to add ‘/’.

This is the Razor for creating the URL.

  • 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-08T11:49:31+00:00Added an answer on June 8, 2026 at 11:49 am

    You could adapt this solution Lower case URLs in ASP.NET MVC to redirect the user when the url does not end with a /

    Or put it in a HttpModule like so:

    public class UrlMessingModule : IHttpModule
    {
        public void Init(HttpApplication context)
        {
            context.BeginRequest += Application_BeginRequest;
        }
    
        public void Dispose() { }
    
        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            var application = (HttpApplication) sender;
            var request = application.Request;
            var response = application.Response;
    
            var url = request.Url.AbsolutePath;
    
            if (url.Length > 1 && !url.EndsWith("/"))
            {
                response.Clear();
                response.Status = "301 Moved Permanently";
                response.StatusCode = (int)HttpStatusCode.MovedPermanently;
                response.AddHeader("Location", url + "/");
                response.End();
            }
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I do a Redirect Rule that transforms this URL: http://localhost/app/Company/HomePage.aspx?COMPANYID=2&FORCESHOWCASE=TRUE&THEMEPREVIEW=3 to this
suppose I have a url like :http://localhost:32432/ When I go to this url I
I have URL like this: http://localhost/PMApp/temp.htm?ProjectID=462 What I need to do is to get
I am making a url like this url = new URL(http,localhost,9080,/path/to/my/resource/myAction.action); instead of making
I'm new to cakephp...and I have a page with a url this: http://localhost/books/filteredByAuthor/John-Doe so
When i access this url: http://localhost:8000/ProjectOverview/proj_view/15/ Django tells me that the format is in
This is working: RewriteRule ^([a-z]{2}/){0,1}showCategory/([0-9]*)/([0-9]*)(/{0,1})$ /main.php?id=$2&il[lang]=$1&page=$3 [L] with this URL: http://localhost/showCategory/590/10 Now I want
So I would like to rewrite this URL: http://localhost/mock/foo.php?lang=eng&userID=2 To: http://localhost/apiMethod.pl?lang=eng&userID=2 So when I
When I try to go to this url: http://localhost:3000/lessons/18/pages , I get this error:
I have the following URl: http://localhost:12981/BaseEvent/EventOverview/12?type=Film This is route: routes.MapRoute( Default, // Route name

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.