Questions tagged [trailing-slash]

A slash sign at the end of a URL.

A slash sign at the end of a URL.

263 questions
0
votes
1 answer

htaccess adds unwanted characters

I've a htaccess file that looks like this Options +FollowSymLinks Options -Indexes RewriteEngine on RewriteBase /website/ # add slashes after link/folder RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #RewriteCond…
Georgi Demirev
  • 446
  • 3
  • 22
-1
votes
1 answer

Htaccess - redirecting trailing slash to no-slash URL

I need to redirect trailing slash exact URL ( www.xyz.com/registration/ ) to non-slash ( www.xyz.com/registration ) with httaccess. But only this exact URL, not any other. How to do it?
Frasier
  • 11
  • 3
-1
votes
1 answer

Is there a way to automatically add a trailing slash to all URLs except for URLs ending with a file extension (i.e. .pdf, .html, ...)?

Here is my .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} ^mywebsite\.com [NC] RewriteRule ^(.*)$ https://www.mywebsite.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond…
WhoCares
  • 13
  • 3
-1
votes
1 answer

Cannot get rid of trailing slash in IIS

I am losing my mind over IIS 10 putting a trailing slash whenever i target a subfolder on my web server that contains an index file. Not only it always redirects via 301 to a trailing slash, my SEO rankings are hurt so badly that i can't rank up…
Djongov
  • 195
  • 2
  • 13
-1
votes
1 answer

Function of Optional Trailing Slash

Can anyone give me a brief introduction to the "Optional trailing slash" and its function in HTML? in the guide I am following it just says that it is optional and has no function.
-1
votes
1 answer

Redirect URL with Trailing Slash `/` to the one without in .htaccess

When a URL is typed with a slash at the end it returns 404 not found page. For example: http://www.example.com/index/ gives 404 not found. what code to add in .htaccess to redirect it? For directories, it works fine but for html files it…
MEGA
  • 261
  • 1
  • 2
  • 9
-1
votes
1 answer

A really weird .htaccess issue

So let us say that my website is www.example.com and I have a contact.html page in the root. The URL normally shown in the address bar is: http://example.com/contact.html For my site, I want the URL to have: no www no .html a trailing slash So…
Mihir Chaturvedi
  • 266
  • 1
  • 5
  • 12
-2
votes
1 answer

Flask when I wrote app.route('/home') and edited it app.route('/home/') and restore it

I'm studying flask, and got problems. When I wrote code like this: @app.route("/reference") def reference(): return render_template("reference.html", css="reference", records=records) The page http://127.0.0.1:5000/reference was working. Then I…
이상민
  • 1
  • 1
1 2 3
17
18