I have a Drupal7 site hosted in a sub-directory and site can be access following with directory path and trailing slash:
http://mydomain.com/dir1/dir2/ (with the trailing slash).
I’m looking to access this site without the trailing slash:
http://mydomain.com/dir1/dir2
I tried with the DirectorySlash Off in the .htaccess file. But it gives Access forbidden error when accessing site without trailing slash.
Then I created a new .htaccess file in the ../dir1 and tried to rewrite the url to get the main page content when user access site without trailing slash.
<IfModule mod_rewrite.c>
DirectorySlash Off
RewriteEngine on
Options +FollowSymLinks
RewriteRule ^dir2$ dir2/index.php
</IfModule>
Again I’m getting the same issue “Access forbidden”. Is there anything to do in .htaccess file in Drupal root after setting these rules?
Any idea how to access Drupal site hosted in a sub-directory without trailing slash?