Устанавливает ли mod_rewrite «Alias» автоматически или он должен быть явно указан при выполнении «RewriteBase»? - PullRequest
0 голосов
/ 15 января 2012

От: RewriteBase Документы Apache

        #  /abc/def/.htaccess -- per-dir config file for directory /abc/def
        #  Remember: /abc/def is the physical path of /xyz, i.e., the server
        #            has a 'Alias /xyz /abc/def' directive e.g. #

        RewriteEngine On

        #  let the server know that we were reached via /xyz and not
        #  via the physical path prefix /abc/def
        RewriteBase   /xyz

        #  now the rewriting rules
        RewriteRule   ^oldstuff\.html$  newstuff.html 

Имеет ли эти строки:

        #  Remember: /abc/def is the physical path of /xyz, i.e., the server
        #            has a 'Alias /xyz /abc/def' directive e.g. #

означает, что
mod_rewrite устанавливает Alias /xyz /abc/def' автоматически на основе файла .htaccess или показывает, что это указывается явно в файле conf?

1 Ответ

2 голосов
/ 15 января 2012

Он не устанавливает Псевдоним автоматически: вам нужно явно указать его в конфигурации вашего сервера, а не .htaccess

...