P
P
Pavel2017-05-23 09:48:40
Apache HTTP Server
Pavel, 2017-05-23 09:48:40

How to change site root using htaccess?

Hello!
There is a main site (available only by IP).
At the root of the site, I created a directory and placed another site (temporary solution for demonstration). But it doesn't work. all links to files (css/js) and other pages are generated relative to the root.
Is it possible to change the root for a subsite via htaccess? And if YES, how to do it?
PS The advice to rewrite all the paths is not good.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
ozornick, 2017-05-23
@ozornick

Edit vhosts or use mod_rewrite.

V
Vasily Nazarov, 2017-05-23
@vnaz

Option 1. The simplest thing is to make a subdomain.
Option 2. If links, as you write, are generated , correct the generator code.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question