apache - Redirect URLs with a trailing slash to URLs with no trailing slash via htaccess rule with [QSA,L] -


recently broke ties wordpress , migrated of site's content own custom-made cms. works great except 1 thing. previous links site's blog posts have trailing slash. since none of current urls have trailing slash, previous links no longer work , seo non-existent. i've been attempting find htaccess rule redirect trailing slash urls urls no trailing slash, of now, nothing works.

use redirect rule first rule remove trailing slash:

rewriteengine on  rewritecond %{request_filename} !-d rewriterule ^(.+)/$ /$1 [ne,r=301,l] 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -