Mod rewrite ignore subdomain

I use mod-rewrite for pretty URLs designed to work in the root of the domain. It works fine, but now I'm trying to get it to work on a subdomain, and it continues to give "500 Internal Server Error".

The subdomain is automatically redirected to a folder with this name in my hosting account ( sub.domain.com shows the contents of domain.com/sub/ ). This is not so, because this request is already automatically overwritten automatically, or can I just change something in htaccess to address the subdomain?

Options +FollowSymLinks
IndexIgnore */*
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
+3
source share
1 answer

- , DocumentRoot /domain/sub/directory ( ) , , RewriteRule ( , / Chrome Firefox + firebug, , "" ). , , , /domain.com/sub/, . .htaccess, index.php, images, js css . , .htaccess, .

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php  [L]
0

Source: https://habr.com/ru/post/1750707/


All Articles