M
M
Michael2019-01-23 17:56:49
htaccess
Michael, 2019-01-23 17:56:49

How can some PHP functions be done for a single site?

There is a php5.6-fpm
nginx server .
There is a task to connect in the php.ini config for one of the sites the ability to save php sessions in memcached.
If I write in a single file, then one site works and the rest fall out in a 500 error
.
If so, how is it correct?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2016-05-25
@shambler81

If in the middle of the line

RewriteCond %{REQUEST_URI} ^(.*)/dir1/(.*)$ 
# если строка содержит /dir1/ 
RewriteRule ^(.*)$ %1/dir2/%2 [R=301,L] 
#Перенаправить все урлы с начинающиеся с dir1 на dir2 с сохранением дальнейшей структуры URL

In your case, it will be even easier because you have from the root
RewriteCond %{REQUEST_URI} ^dir1/(.*)$ 
# если строка начинаетсяс /dir1/ 
RewriteRule ^(.*)$ /dir2/%1 [R=301,L] 
#Перенаправить все урлы с начинающиеся с dir1 на dir2 с сохранением дальнейшей структуры URL

B
Boris Korobkov, 2019-01-23
@BorisKorobkov

php.net/manual/ru/function.session-set-save-handler.php
Or php.net/manual/ru/function.ini-set.php
Or https://docs.docker.com/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question