Get current directory name in htaccess and prevent redirection
I have this .htaccess file:
Options +FollowSymLinks
DirectorySlash On
RewriteEngine On
# Remove trailing slash for non directories
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /mydir%1/$1 [R,L=303]
# Make direct files accessible
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond […]
See original post by invalid@example.com (omidgfx)
Leave a Reply
You must be logged in to post a comment.