S
S
Svjatoslav Torn2016-09-12 08:44:06
Apache HTTP Server
Svjatoslav Torn, 2016-09-12 08:44:06

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

I tried to find something in the dock, but I can't understand stupidly)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Svjatoslav Torn, 2016-09-12
@torns

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

A
Alexey, 2016-09-12
@alsopub

Well, the first obvious thing that comes to mind is that the mod_rewrite module is probably not connected?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question