I am developing this app using Zend Framework 1.12. I wan to get rid off the index.php
using .htaccess. Right now my url looks like this:
http://foo.com:10080/Reports_Century/public/index.php/reports/neworders
I want to be able to look like this
http://foo.com:10080/Reports_Century/public/reports/neworders
Is it possible? my htaccess looks has the following lines:
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.
Have your
public/.htacess
like this:You also need to activate "AllowOverride All" for your directory in
apache2/sites-enabled/default
:Version without index.php is default in Zend. You don't have to change default .htaccess. I bet you didn't enabled rewrite module in apache* or disabled rewriting in config.
* copy
rewrite.load
file tomods-enabled
folder in apache (on ubuntu it's in/etc/apache
)Try adding this right below
RewriteEngine On
finally found where the issue was. The problem was the $1 after index.php/.
the final .htaccess is:
@Anubhava giving you a plus one for speding the time and helping me with the solution.