Mates, I've been looking arround but still couldn't find the solution.
I have this on apache2.conf
<Directory /home/pablo/htdocs/elementalguru/cuentas/idpetecuador.com/www/system/public>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
This on 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 localhost
ServerAdmin webmaster@localhost
DocumentRoot /home/pablo/htdocs
# 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>
<VirtualHost *:80>
DocumentRoot "/home/pablo/htdocs/elementalguru/cuentas/idpetecuador.com/www/system/public"
ServerName eguru.idpet.sys
</VirtualHost>
And the .htaccess
file on public folder is like this:
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
But still when I try to access a url like
http://eguru.idpet.sys/clinicas
Which is stated in hosts file.
I get a 404 error message.
Any idea why? Thanks in advance!
Is your mod_rewrite
enabled?
Try $ a2enmod rewrite
and then restart apache.
Here is the laravel/laravel .htaccess
, have you tried this?
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.