Answer the question
In order to leave comments, you need to log in
What's wrong with .htaccess or apache2?
Hello, I say right away that there are no such problems on the open server.
Situation on VDS server, Debian 8, Apache 2.4.
.htacces standard does not work here.
index.php opens and then no matter what link is clicked, it throws 404, in the url line like domain.rr/login
, and when I add the .php extension, it opens it for me.
I attach .htaccess
# Comment the 2 lines below if the server returns 500 errors!
Options +Indexes
Options +FollowSymLinks
AllowOverride All
#Uncomment following lines if you want to use image caching!
#<IfModule mod_expires.c>
# ExpiresActive On
# ExpiresDefault A1209600
# ExpiresByType text/html A1
#</IfModule>
# Uncomment following lines if Apache doesnt support MultiViews!
<IfModule mod_rewrite.c>
RewriteEngine On
# Uncomment the 2 lines below if you are using www.domain.com
# as the baseurl for the site and users access your site
# via domain.com (THIS IS REQUIRED FOR JQUERY TO WORK)
RewriteCond %{HTTP_HOST} ^lovemy.xyz [NC]
RewriteRule ^(.*)$ http://www.lovemy.xyz/$1 [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* loader.php [L,QSA]
</IfModule>
# Edit below lines and set to
# ErrorDocument CODE /RELATIVE/error.php
# If the script is installed in the default document
# root then relative is null.
#ErrorDocument 401 /error.php
#ErrorDocument 403 /error.php
#ErrorDocument 404 /error.php
Answer the question
In order to leave comments, you need to log in
RESOLVED.
In /etc/apache2/apache2.conf in the required directories I did the following:
Options Indexes FollowSymLinks
AllowOverride All - enabled this option, (was None) it allows you to get additional apache settings from .htaccess files in the site directory.
Require all granted
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question