Questions tagged [trailing-slash]

A slash sign at the end of a URL.

A slash sign at the end of a URL.

263 questions
1
vote
0 answers

Trailing slash at the end of Servlet uri in Websphere Application Server 9 is throwing 404, but it's working fine in WAS 7

In my application I have a servlet which is supposed to get executed after j_security_check in WebSphere Application Server Traditional 9.0.5.4. The Login form is as below with the j_security_check
Bill
  • 11
  • 1
1
vote
0 answers

How to get rid of trailing slashes and make a redirect to homepage in nuxt.js

When I’m trying to open site with trailing slashes (example.com///) in the end I’m getting an error in the console, but I want to make redirect to example.com/ It's in my nuxt.js project which I deployed to Google App Engine. I searched and tried a…
1
vote
0 answers

Unable to access URL without trailing slash on NGINX

I have deployed my Angular 8 app on NGINX inside a subdirectory named test folder. The app can be accessed successfully if the URL contains of a trailing slash. E.g. www.example.com/test/ However, if it is accessed through www.example.com/test then…
1
vote
1 answer

Nginx append a trailing slash to the url

I am having an issue in Safari and IE where a django redirect does not include the authorization headers. This leads to the requests being rejected. These redirects happen with the URL does not end with a /. So I am trying to handle adding the / in…
nael
  • 1,441
  • 19
  • 36
1
vote
0 answers

How To Force Redirect To Https + Non-WWW + Trailing Slash With A Single 301 Redirect?

I want all my users to be redirected to https://example.com/subfolder/ A single 301 redirect that redirects to https + non-www + trailing slash. How do I do this in htaccess?
1
vote
1 answer

Adding trailing slash to sitemap

Would it be possible to add a trailing slash on the sitemap? For example my current sitemap :
kervin
  • 13
  • 2
1
vote
0 answers

How to force all URLs to have a trailing slash in Shopify

By default Shopify ends urls without a trailing slash, though a path to a version with the trailing slash can still be used. I'd like to avoid having both url paths as options and force the version without a trailing slash to redirect to the version…
jhawes
  • 2,354
  • 3
  • 24
  • 34
1
vote
1 answer

nginx configuration with no trailing slash

I am trying to configure my nginx. I want it to serve a php file: dir/index.php,but do it the way that i can acces it with localhost/dir request (with no trailing slash) without invoking nginx 301 redirect. I tried all of the solutions found here,…
1
vote
0 answers

Disable trailing slash redirect in Apache so POST requests work with index.php

I'm setting a index.php script that will take sent POST requests, but when sending such requests the trailing slash is added through a 301 redirect and the POST data is lost. For instance: POST request is made to host/test Server redirects to…
H. Soda
  • 11
  • 3
1
vote
1 answer

Web.config: redirect URLs entered with trailing slash to URL without trailing slash

I have inherited a website PHP website, running on IIS 7.5. If I go to: https://www.example.com/page there are no errors, it displays page.php content as expected. If I go to: https://www.example.com/page/ I receive a 404 not found error. I'd like…
Erin M.
  • 9
  • 3
1
vote
1 answer

Apache .htaccess: How to add missing trailing slash to URLs but ignore files and special URLs?

As my web project sometimes throws 404s if trailing slashes are missing I always want my server to add trailing slashes to the URLs. Therefore I have used the following pattern in .htaccess: # ################################## # # Redirect…
Blackbam
  • 17,496
  • 26
  • 97
  • 150
1
vote
1 answer

Removing trailing slash at the end of file names in a folder

Removing trailing slash at the end of file names in a folder http://www.example.com/directory/index.php/ should return to http://www.example.com/directory/index.php (that is without trailing slash at the end - it can be any file type like html,…
AMLU
  • 19
  • 1
1
vote
1 answer

Why adding trailing slash breaks caching?

:trailing_slash - If true, adds a trailing slash, as in “/archive/2005/”. Note that this is currently not recommended since it breaks caching. https://apidock.com/rails/v4.1.8/ActionView/RoutingUrlFor/url_for
1
vote
2 answers

Lumen application work with trailing slash using Nginx server

all I am new to Lumen cause I was using something else before. I have tested Lumen project and find out that it works well with nice support and documentation and can be extend to Laravel which is a bigger project. So I decide to use Lumen for a…
nathiboat
  • 15
  • 5
1
vote
1 answer

Force the trailing slash. Processing overhead?

I want to force trailing slashes in folders and not trailing slashes in files. I want a way to avoid possible duplicates. I found that answer: Htaccess: add/remove trailing slash from URL RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1…
Nrc
  • 9,577
  • 17
  • 67
  • 114