Jump to content

How do i redirect / to non trailing version?

Featured Replies

Posted

I have switched on to show non-trailing slash url but still google index is showing / version and not non-trailing version.

How do I permanent redirect https://carnity.com/classifieds/ to https://carnity.com/classifieds

If I do Redirect 301 in htaccess then all internal pages crash as they become this

https://carnity.com/classifiedsitem/744-patrol-2014-big-machine-platinum

instead of 

https://carnity.com/classifieds/item/744-patrol-2014-big-machine-platinum

 

RewriteRule ^classifieds/$ /classifieds [R=301,L]

 

Add after

RewriteEngine On

Ex

RewriteEngine On
RewriteRule ^classifieds/$ /classifieds [R=301,L]
  • Author

It's crashing the site now with these codes

 

image.thumb.png.1187c8becdf504c776a903237fa8906f.png

I guess you copied the code with invisible chars

Attach you htaccess file

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.