Hello Guys,

I written code for adding trailing slash using htaccess. code as below.

RewriteEngine On
Options +FollowSymlinks

RewriteBase /

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

RewriteRule ^index/$ index.php

This code is perfectly working xamp local server.

http://www.domain.com/index/ - executes http://www.domain.com/index.php

But when i upload files on live linux server. it does not work. because index.php available on server like same name not work. If i make it.

RewriteRule ^home/$ index.php

then it will work on server.

http://www.domain.com/home/ - executes http://www.domain.com/index.php

It means, the same file name exists then not work.

Please help on this. what is the problem. any rewrite condition to resolve this problem.