htaccess problem

I have a problem to hide index.php

I write at main.php -config file


'urlManager'=>array(

'urlFormat'=>'path',

'showScriptName'=>false,

'urlSuffix'=>'.asp'

),

and at .htacess


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 [L]

Put there is a page not found error when I hide index.php at url.

What is wrong, I have debian and the site is at a subfolder of the root.

I think it is index.php and not /index.php

Anyway, try this:

[code]RewriteEngine On

RewriteCond %{REQUEST_FILENAME} -s [OR]

RewriteCond %{REQUEST_FILENAME} -l [OR]

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^.*$ - [NC,L]

RewriteRule ^.*$ index.php [NC,L]

Thank you,

But again an error 404 page not found…

The strange is that at windows vista (xampp) the site is ok.

The site is at subfolder of root and it does not have a domain name.

my htacess


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



Work fine with xampp for Linux, but xampp for windows not work.

I am wondering if I have to ‘install’ mode_rewrite ,my php has not pdo_mysql and I have to install it also

I see that apache does not read .htaccess at all.

For instance I go to mysite/protected and I see the files but at protected there is a .htaccess with deny from all

What is wrong?

Check in apache conf if htaccess overwrite is enabled:


    #

    # AllowOverride controls what directives may be placed in .htaccess files.

    # It can be "All", "None", or any combination of the keywords:

    #   Options FileInfo AuthConfig Limit

    #

    AllowOverride None

Change None to All

I set at http.conf this


<Directory />

             Options FollowSymLinks

             AllowOverride All

#            Order deny, allow

#            Deny from all

</Directory>

but it does not work,what is wrong, as I see mode_rewrite is enable

[Edit]I solved it, is was not enable