예쁜 URL이 나를 위해 작동하지 않는 것 같습니다. 난 여기에 내 공개/디렉토리의 htaccess로 파일을 확인 편집 한 당신이 http://wasamar.com.ng/login
을하려고 할 때 그것은하지만 http://wasamar.com.ng/inde.php/login
를 찾을 수 없음 (404)의 응답을 제공, 내가 알고있는 모든 것을 시도했다 :예쁜 URL이 laravel5.2에서 작동하지 않습니다.
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule^index.php [L]
</IfModule>
이를 /etc/apache2/sites-available/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 wasamar.com.ng
ServerAdmin [email protected]
DocumentRoot /var/www/html/wasamar/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>
내가 뭘 잘못하고 있니?
Apache 가상 호스트의 루트 디렉토리는 무엇입니까? –
어디에서 확인할 수 있습니까? 당신이 말하는/etc/apache2입니까? – udemethegrtman
여러분의 OS에 의존합니다. 예를 들어 데비안의 경우'/ etc/apache2/sites-available /'와 같습니다. –