Apache .htaccess : How to remove slash from directory end? -


how remove slash directory end?

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

this rule doesn't work directories. issue?

i don't think going work.

say have file that in 2 directories /this , /that. 2 directories in apache root directory /var/www/domain.com

you're looking turn directory http://domain.com/that/ work http://domain.com/that. if think it, there's (or be) file that sitting in /var/www/domain.com. if logic apache allowed rewrites that, end requesting /var/www/domain.com/that file , not original directory. if /var/www/domain.com/that didn't exist, 404 you're seeing now.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -