Jun 25, 2011

apache and htaccess

1. in your Directory

DirectoryIndex index.php index.html
Options Indexes FollowSymLinks MultiViews
AllowOverride All ##### this should be All
Order allow,deny
allow from all


2. in your /var/www/xxx folder, add file .htaccess
Options +FollowSymLinks
IndexIgnore */*

RewriteEngine on
# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# otherwise forward it to index.php
RewriteRule . index.php

No comments:

Post a Comment