htaccess file listing directory instead of using index.php
I'm using nanoCMS (from mini-print.com) for website. And htaccess file
they provide.
Directory structure is - cms/ error404.php htaccess-laplume.txt
htaccess.txt img/ readme.txt
while entering to localhost/ i'm getting list of files instead of redirect
to /cms/index.php
I cannot figure this out! Can anyone suggest something to help?
(here is htaccess file)
# Edit and save this file as .htaccess before uploading
AddDefaultCharset UTF-8
Options +FollowSymLinks -Indexes
RewriteEngine On
DirectoryIndex index.php
ErrorDocument 404 /error404.php
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ /cms/index.php [L]
RewriteCond %{REQUEST_URI} ^/cms/inc/menu\.php$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/inc/inmenu\.txt$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/admin/list\.php$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/([A-Za-z0-9_-]+)\.txt$ [OR]
RewriteCond %{REQUEST_URI} ^/cms/comments/([A-Za-z0-9_-]+)\.txt$ [OR]
RewriteCond %{REQUEST_URI} ^/img/$
RewriteRule .* - [F]
RewriteCond %{REQUEST_URI} ^/cms/$
RewriteRule ^cms/$ / [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /cms/([A-Za-z0-9_-]+)\.php\ HTTP/
RewriteRule ^cms/([A-Za-z0-9_-]+)\.php$ /$1 [R=301,L]
RewriteCond %{REQUEST_URI} !^/index$
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([A-Za-z0-9_-]+)\ HTTP/
RewriteRule ^([A-Za-z0-9_-]+)$ /cms/$1.php [L]
No comments:
Post a Comment