I have a VPS running CentOS 7 and an Apache server, and I have a site in it, working perfectly inside the / var / www / html / mysite folder. But this using HTTP. I then decided to generate an SSL to run the site on HTTPS. From then on, the site runs using HTTPS, but only the home page. The rest of the pages do not load, give me a 404 error (Example: "The requested URL / admin was not found on this server").
So here's my .htaccess:
<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]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
My VirtualHost in httpd.conf:
<VirtualHost *:80>
ServerName www.meusite.com.br
ServerAdmin [email protected]
DocumentRoot /var/www/html/meusite/public
<Directory /var/www/html/meusite/public>
AllowOverride All
</Directory>
I'm breaking my head to find the mistake but I have no idea what it can be. Does anyone have any ideas? Thanks!