In ZF. htaccess, how does one remove fixed index. php? the structure of the current file is the same as that of the official one. Public/index. phpapplication/controllers/indexController. php now I use localhost/test/public/index for every access. php/index/in ZF. how to remove a fixed index in htaccess. php
The structure of the file is the same as that of the official one.
Public/index. php
Application/controllers/indexController. php
Now I need to use
Localhost/test/public/index. php/index
, How to remove index. php from. htaccess,
The content of my current. htaccess file is as follows:
RewriteEngine On
RewriteCond % {REQUEST_URI} ^ index. php [OR]
RewriteCond % {REQUEST_FILENAME}-s [OR]
RewriteCond % {REQUEST_FILENAME}-l [OR]
RewriteCond % {REQUEST_FILENAME}-d
RewriteRule ^. * $-[NC, L]
RewriteRule ^. * $ index. php [NC, L]
However, if index. php is removed each time, the page prompts that the page cannot be found.
In apache, AllowOverride All and LoadModule rewrite_module modules/mod_rewrite.so have All been modified.
Please remind me that I have been blocking it for a long time ........
------ Solution --------------------
RewriteCond % {REQUEST_FILENAME }! -D
RewriteCond % {REQUEST_FILENAME }! -F
RewriteRule ^ (. *) $ index. php/$1 [QSA, PT, L]
It should be similar.
------ Solution --------------------
If you do not add index. php to the url, it will not be removed.
------ Solution --------------------
. Htaccess provided by zend framework
PHP code
RewriteEngine OnRewriteCond % {REQUEST_FILENAME}-s [OR] RewriteCond % {REQUEST_FILENAME}-l [OR] RewriteCond % {REQUEST_FILENAME}-dRewriteRule ^. * $-[NC, L] RewriteRule ^. * $ index. php [NC, L]
------ Solution --------------------
Failed to restart apache