A
A
a_alisher2020-06-02 14:17:30
Apache HTTP Server
a_alisher, 2020-06-02 14:17:30

Links on the site do not open when the page is refreshed. 404 not found, how to open access by link?

There is a site on ubuntu, Apache is installed, the site is in the www/panel directory.
The site opens, all links inside the site also open, but if you refresh the page or follow a link outside the site, you get a 404 error (The requested URL was not found on this server.)

In the configuration along the path /etc/apache2/sites-available the following parameters:


ServerName domain.kz
ServerAlias ​​www.domain.kz
# Redirect permanent / https://domain.kz
DocumentRoot /var/www/panel
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

AllowOverride all
# RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]



(instead of domain.kz, my site is specified in the configuration, I just don’t want to shine here)

Tell me what could be the problem? How to solve this issue?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Sundukov, 2020-06-02
@alekciy

follow a link outside the site

What is it like?

K
Karpion, 2020-06-02
@Karpion

This is some very crooked server configuration. Rarely crooked.
Or some cleverly crafted pages.
Try reading the logs - there might be a hint there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question