Apache Laravel 4清洁URL不工作
我正在4.1.25 laravel上实现一个名为learninglocker的应用程序 以下URL运行良好: http://localhost/index.php/password/reset 但如果没有index.php,则无法工作: http://localhost/password/reset 我需要我所有的URL在没有index.php的情况下工作 我不知道问题出在apache还是Laravel上 以下是我的配置文件: phpinfo Apache版本: Apache/2.4.7 Ubuntu 加载的模块: core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat mod_alias mod_auth_基本mod_authn_core mod_authn_文件mod_authz_core mod_authz_主机mod_authz_用户mod_自动索引mod_deflate mod_dir mod dex mod deflate mod_deflate mod_dir mod_过滤器mod_mime mod_prefork mod协商mod_php5 mod_重写mod setenvif状态 apache2.confApache Laravel 4清洁URL不工作,apache,.htaccess,mod-rewrite,laravel,Apache,.htaccess,Mod Rewrite,Laravel,我正在4.1.25 laravel上实现一个名为learninglocker的应用程序 以下URL运行良好: http://localhost/index.php/password/reset 但如果没有index.php,则无法工作: http://localhost/password/reset 我需要我所有的URL在没有index.php的情况下工作 我不知道问题出在apache还是Laravel上 以下是我的配置文件: phpinfo Apache版本: Apache/2.4.7 Ubu
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
/etc/apache2/sites enabled/000-default.conf
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/learninglocker/public/
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
DocumentRoot/var/www/learninglocker/public/
有没有人能帮我,告诉我我做错了,或者我错过了什么
谢谢大家的帮助您是否将此添加到.htaccess?是的,这是:选项-重定向尾随斜杠上的多视图重写引擎。。。重写规则^.*/$/$1[L,R=301]手柄前控制器。。。重写cond%{REQUEST_FILENAME}-已重写COND%{REQUEST_FILENAME}-f RewriteRule^index.php[L]Apache下的php cgi默认情况下不会将HTTP基本用户/pass传递给php RewriteCond%{HTTP:Authorization}^.+$RewriteRule.*-[E=HTTP_Authorization:%{HTTP:Authorization}]