Oracle B12255-01 Manuel d'utilisateur Page 126

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 224
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 125
mod_rewrite
7-56 Oracle HTTP Server Administrator’s Guide
RewriteBase Explicitly sets the base URL for pre-directory rewrites. Rewrite rule can
be used in per-directory configuration (.htaccess) files. When a substitution
occurs for a new URL, the base URL should be added into the server processing. To
be able to do this, the module needs to know what the corresponding URL-prefix or
URL-base is. By default, this prefix is the corresponding file path itself. However, at
most Web sites, URLs are not directly related to physical filename paths. In such
cases, you have to use the RewriteBase directives to specify the correct
URL-prefix.
If the URLs of your Web server are not directly related to physical file paths, you
have to use RewriteBase in every .htaccess files where you want to use
RewriteRule directives.
Example 7–6 RewriteBase Directive
Assume the following per-directory configuration file:
## /abc/def/.htaccess - - per-dir config file for directory /abc/def
# /abc/def is the physical path of /xyz,
RewriteEngine On
RewriteBase /xyz
RewriteRule ^oldstuff\.html$ newstuff.html
In Example 7–6, a request to /xyz/oldstuff.html gets correctly rewritten to the
physical file /abc/def/newstff.html.
Vue de la page 125
1 2 ... 121 122 123 124 125 126 127 128 129 130 131 ... 223 224

Commentaires sur ces manuels

Pas de commentaire