powered by simpleCommunicator - 2.0.51     © 2025 Programmizd 02
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / .htaccess и файлы для пользователей
2 сообщений из 2, страница 1 из 1
.htaccess и файлы для пользователей
    #32727204
Наследники OIT
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
простите, запамятовал что прописать в htaccess для того чтобы для каждого пользователя в папке открывался свой файл.
...
Рейтинг: 0 / 0
.htaccess и файлы для пользователей
    #32731213
Шогал
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
/manual/urlmapping.html#userUser Directories
Traditionally on Unix systems, the home directory of a particular user can be referred to as ~user/. The module mod_userdir extends this idea to the web by allowing files under each user's home directory to be accessed using URLs such as the following.

http://www.example.com/~user/file.html
For security reasons, it is inappropriate to give direct access to a user's home directory from the web. Therefore, the UserDir directive specifies a directory underneath the user's home directory where web files are located. Using the default setting of Userdir public_html, the above URL maps to a file at a directory like /home/user/public_html/file.html where /home/user/ is the user's home directory as specified in /etc/passwd.

There are also several other forms of the Userdir directive which you can use on systems where /etc/passwd does not contain the location of the home directory.

Some people find the "~" symbol (which is often encoded on the web as %7e) to be awkward and prefer to use an alternate string to represent user directories. This functionality is not supported by mod_userdir. However, if users' home directories are structured in a regular way, then it is possible to use the AliasMatch directive to achieve the desired effect. For example, to make http://www.example.com/upages/user/file.html map to /home/user/public_html/file.html, use the following AliasMatch directive:

AliasMatch ^/upages/([^/]*)/?(.*) /home/$1/public_html/$2
...
Рейтинг: 0 / 0
2 сообщений из 2, страница 1 из 1
Форумы / PHP, Perl, Python [игнор отключен] [закрыт для гостей] / .htaccess и файлы для пользователей
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]