Q
Q
qwertyqwerty2017-09-14 14:07:19
htaccess
qwertyqwerty, 2017-09-14 14:07:19

How to change the main directory of the site?

Hello. They wrote me a mini cms in php. I need to have a site in the /main/ directory, and when entering the site, the links lead to a higher level. How to make all links lead to site.ru/main/ and not to site.ru/ ?
.htaccess content

php_flag magic_quotes_gpc Off

DirectoryIndex copy.php
Options +FollowSymLinks

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ copy.php?act=page&url=$1 [QSA,L]

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question