0

I am a beginner to MVC framework in PHP and also to .htaccess file. I use Zend server on Windows OS.

My code in .htaccess is:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d 
RewriteCond %{REQUEST_FILENAME} -f 
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

The line LoadModule rewrite_module modules/mod_rewrite.so is enabled in my httpd.conf file.

the .htaccess not working on my server

1 Answers1

0

To activate htaccess, check your configuration files and ensure you have the following or similar lines:

# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>
grekasius
  • 2,056
  • 12
  • 15
L. D. James
  • 126
  • 6