G
G
good_beginer2018-09-24 11:20:17
Apache HTTP Server
good_beginer, 2018-09-24 11:20:17

How to fix The requested URL /../.. was not found on this server?

I created a project a long time ago and uploaded it to git, then to hosting, now I need to make changes, cloned from git, created a local host for it, but the problem is that only index.php is loaded and when you click on links it gives 404 and even ajax scripts do not work because do not find /../file.php.
the error should be in apache but I just don’t understand where

<VirtualHost *:80>
    ServerAdmin [email protected]

    DocumentRoot /var/www/html/site

    ServerAdmin [email protected]
    ServerName change.com
    ServerAlias www.change.com

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vyrkmod, 2018-09-24
@good_beginer

It is necessary to tell Apache to pull index.php if there is nothing on the url. Something like this

<Directory "/var/www/html/site">
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . index.php
</Directory>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question