Questions tagged [trailing-slash]

A slash sign at the end of a URL.

A slash sign at the end of a URL.

263 questions
2
votes
0 answers

jquery.ajax type:post strange behavior

update start oooooops, I've just found that it's not a get & post problem, but a SpringMVC RequestMapping & trailing slash & http 302 problem. when a /editor get-request is called, 302 returns, and response location is /editor/, but if I change…
Luffy
  • 99
  • 1
  • 10
2
votes
2 answers

How to dynamically set the base tag?

We are using backbone routing, mod_rewrite, requirejs. The app is in a folder, not on the web root, so relative folder references are required for images,css, and js files (if we could use absolute folders the files would load). When accessing a…
punkael
  • 121
  • 2
  • 10
2
votes
3 answers

URL fragments: a leading slash in your hash url - good or bad?

Just need to know whether it is a good or not to have a leading slash in your hash url. For instance, site.come/#/directore/file/ or site.come/#directore/file/ I am asking this because backbone.js does not recommend the first option in their docs…
Run
  • 54,938
  • 169
  • 450
  • 748
2
votes
1 answer

Iis7 setting causing trailing backslash

I'm experiencing a issue when i deploy the same MVC4 asp.net website to two different IIS7 servers. On one box when i hit the "home" button for my website i get a trailing backslash and on the other i do not. The problem being , on the box that…
Alicia
  • 1,152
  • 1
  • 23
  • 41
2
votes
3 answers

catalyst consistent url format with trailing slash

I'm developing a Catalyst application and having trouble with the way Catalyst interprets urls. Let's say that in our Catalyst application we have a controller Account. If this is the case, Catalyst will interpret http://mydomain.com/account …
srchulo
  • 5,143
  • 4
  • 43
  • 72
2
votes
3 answers

Matching an empty route and a trailing slash in Backbone route?

I know that there are some issues with having duplicate content (SEO), but that is not something that my project is concerned with. In my backbone router, I have this : routes: { "": "startOrder", "order/:orderNumber/:stepName": "getOrder", …
D'Arcy Rail-Ip
  • 11,505
  • 11
  • 42
  • 67
2
votes
2 answers

Getting 301 instead of 404 when adding trailing slash to URL

I've been working for hours in this and can't find information about it. Well yes, there is information, but I can only find separate solutions that don't work put toguether. I'm trying to start from this: RewriteCond %{REQUEST_URI}…
1
vote
1 answer

Get rid of trailing slash from homepage by htaccess

I want to get rid of the trailing slash from homepage by using htaccess. My Actual URL was something like this http://www.mydomain.com/iphone_index.php I got rid of iphone_index.php from the URL by htaccess. The code I used to do this is…
Alok Tripathi
  • 29
  • 1
  • 1
  • 7
1
vote
1 answer

Django - trailing slash resets page title

I apologise for the blatant ignorance of this question but I've been charged with fixing something in Django that I have NO experience with! We're getting an issue with URLs and duplicated content. If we visit "www.hello.com/services/" then we get…
Cordial
  • 539
  • 3
  • 7
  • 22
1
vote
1 answer

.htaccess Add a Trailing Slash to File Name doesn't Work?

I have managed to successfully remove the .php extension to my files, but am having problems adding a trailing slash to my pages. Sorry if this has been covered before, have searched everywhere but can't find anything that will work. Any help would…
Darren
  • 11
  • 2
1
vote
1 answer

Spring Boot 3 Controller Handling POST Requests with Trailing Slash Issue

I am facing an issue with my Spring Boot application where I have a single controller that handles POST requests only. I have set the context path in my application.yml as server.servlet.context-path: /context/path. The goal is to handle POST…
Rafi
  • 467
  • 6
  • 17
1
vote
1 answer

Can't remove trailing slash from WordPress base URL in subdirectory

I have a WordPress in the directory www.example.com/blog/ and it works fine. All the URLs ended in '/' (www.example.com/blog/article/), but I have corrected it from Settings/Permalinks (www.example.com/blog/article). There is only one URL that I…
1
vote
0 answers

404 error after adding `trailingSlash: false` in a docusaurus website

I have a website made by docusaurus 2.0.0-beta.18. I realize that, in production, when I click on items in the sidebar it first goes to https://example.com/docs/a-page. If I reload the page, the url becomes https://example.com/docs/a-page/. This…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
1
vote
0 answers

How to remove .php extension from URL and trailing slash in nginx

I am trying to remove the .php extension from the URL and at the same time, I have to allow trailing slash. I am attaching my code below. My code successfully removed the .php extension but not adding a trailing slash. Please help. location / { …
1
vote
0 answers

angular force trailing slash on default path

I want to force a trailing slash on default path. I used as reference: https://www.c-sharpcorner.com/article/angular-7-routing-with-preserving-trailing-slash-in-url/ My implementation works on every route except the default path ''. In my app…