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

Docusaurus baseUrl issues with Static Hosting Vercel and Netlify

we are trying to build our documentation website with docusaurus. We are closed to launch our product. But we are facing problems with the deployment. We are trying to host the website with vercel. The problem we are stated below. We configured…
Mr.spShuvo
  • 428
  • 4
  • 12
1
vote
1 answer

Should I use a trailing slash when disallowing a directory in robots.txt?

I want to disallow crawling of a directory /acct in robots.txt Which rule should I use? Disallow: /acct or Disallow: /acct/ acct contains sub-directories and files both. What is the effect of a trailing slash?
marcg
  • 552
  • 1
  • 8
  • 20
1
vote
1 answer

In Apache how to do an external redirect to the slashless version of a URL with a subfolder .htaccess file

On Apache 2.4 I have an .htaccess (in a subfolder) which rewrites slashless requests inside that folder to appropriate index files: DirectorySlash Off RewriteEngine On RewriteCond %{REQUEST_FILENAME} -d RewriteCond %{REQUEST_URI} !/$ RewriteCond…
halloleo
  • 9,216
  • 13
  • 64
  • 122
1
vote
1 answer

Matching a specific string between foward slash or # using regex

I'm trying to make this regex: ([?=section\/en\/]*)([^\/#]*) For these…
1
vote
1 answer

Forcing to add trailing slash causing error

I am forcing my website to add trailing slash, but it is showing error - Too many Redirects. I have used these two methods to add traling slash and both gave error. function add_slash( $string, $type ){ $string = trailingslashit($string); …
Mohammad Umar
  • 1,722
  • 1
  • 14
  • 20
1
vote
0 answers

IIS make a 301 redirect on directory appending a final slash

I have a MVC project with razor pages. I am moving some razor pages in static html pages but I do not like I see in url the index.html extension. I only wrote a 301 redirect rule:
Simone
  • 2,304
  • 6
  • 30
  • 79
1
vote
1 answer

Remove trailing slash with htaccess with existing rules

I wish to remove a trailing slash when one is given using htaccess. What would be the best way to do it that will work with my existing rules as below: # make sure www. is always there RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$…
NaughtySquid
  • 1,947
  • 3
  • 29
  • 44
1
vote
1 answer

Rewrite Rule to remove .php gives back an error when using a trailing slash in the URL

I've a problem with some rewrite rules for my URL, I'm using this rule to remove .php from the URL of my website Options +SymLinksIfOwnerMatch RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule…
thenewbie
  • 21
  • 4
1
vote
2 answers

AWS ALB Redirects HTTPS to HTTP without trailing slash

I have an nginx server running on port 8080 that sits behind an AWS Application Load Balancer. I have the following location block in the nginx.conf, location / { limit_except GET { deny all; } root /root/of/project/; …
1
vote
1 answer

Random routes with trailing slash in Nuxt.js

I'm having some "issues" with a project in Nuxt.js. I have created three pages: register.vue, login.vue and index.vue. I was trying to do some functions with middleware in order to redirect between views in case that one user was logged in or…
Javi Martínez
  • 368
  • 1
  • 4
  • 16
1
vote
1 answer

Cloudflare page rules for removing multiple trailing slash

I want to set up the below things in Cloudflare. https://example.com// OR https://example.com// OR https://example.com/// OR onwards are redirecting to https://example.com/ How can I set up this using the Cloudflare page rule?
Subhash
  • 762
  • 9
  • 25
1
vote
2 answers

Google Data Studio Calculated Field / REGEX Assistance Request

I used Google Data Studio to combine a large website sitemap containing the Page URL with the Google Analytics performance data for the same Page URLs going back five years. I am attempting now to identify the navigational depth of each of those…
1
vote
1 answer

Nginx redirect without trailing slash

How can I redirect "http://test.com/" to "http://test.com" with Nginx? I tried rewrite ^/(.*)/$ /$1 permanent; But this work only for http://test.com/anything/ not for root Thanks a lot
recursive
  • 11
  • 1
1
vote
0 answers

Is it possible to redirect a trailing slash page ending to .php in a different folder/subfolder?

I've seen lots of examples of redirecting all the files in a folder using rewrite rules, but is it possible (and if so, how!) to redirect a page ending with a trailing slash to a completely different page ending with .php in a different folder or…
Peter5673
  • 21
  • 1
1
vote
1 answer

htaccess redirect subfolder .php file to trailing slash

I've tried all sorts of suggestions for .htaccess but nothing seems to work for some reason. All i want is to redirect all of the .php files in http://www.pokertips.org/blog/ to a non-php ending. I've tried it with a .htaccess file in the /blog/…
Peter5673
  • 21
  • 1