0

Although I have tried hard, I could not be able to remove the auto-added "/" signs at the end of URLs. Please kindly help me. I can send the .htaccess file content of my site. I could not paste here. It gives error. Is there a way to attach it here for you?

Thanks in advance

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
Jack R
  • 9
  • 2
  • ` I could not paste here` - why? just make it part of your question using proper `{}` formatting – Marcin Orlowski Apr 04 '17 at 18:49
  • 1
    Please Read [How to ask GOOD Question](http://stackoverflow.com/help/how-to-ask) – Abdulla Nilam Apr 04 '17 at 18:50
  • @marcin-orlowski Thanks, where shall I add it? Thanks in advance. {# BEGIN WpFastestCache Redirect 301 /casino-reviews http://www.top10-casinosites.net/reviews/ RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^top10-casinosites.net RewriteRule ^(.*)$ http\:\/\/www\.top10\-casinosites\.net\/$1 [R=301,L] # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress } – Jack R Apr 05 '17 at 20:48
  • in question body, using proper formatting with `{}` button – Marcin Orlowski Apr 05 '17 at 21:55

1 Answers1

0

To enforce no trialing slash

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

Htaccess: add/remove trailing slash from URL

Community
  • 1
  • 1
liorsolomon
  • 1,785
  • 14
  • 24
  • Thanks a lot but my current htaccess file content is below. Where shall I add it? Thanks in advance. {} – Jack R Apr 05 '17 at 20:41