V
V
Vladimir2016-12-05 21:25:47
Nginx
Vladimir, 2016-12-05 21:25:47

Why does the server get a 404 error?

Good day! I am making a site on yii2 and when transferred to the besthosting.ua server, it does not work. At first, the version of php from 5.4 to 5.3 always fell there and htaccess did not work, the redirect to the web folder did not work. They gave me the web folder in their documentRoot. I removed the .htaccess file from the site root. The only thing left is the .htaccess file in the web folder:

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine on
RewriteBase /home/goldhous/domains/goldhouse.com.ua/public_html/web

# if a directory or a file exists, use it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# otherwise forward it to index.php
RewriteRule . index.php

The site opens only the first page, Index (goldhouse.com.ua). When you try to go to any other page (not all of them are spelled out correctly), for example, view/apartment or view/house gives 404 (nginx). What have I done wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Samarkand, 2016-12-05
@Samarkand

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question