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
.
Содержание HTTP Server
Страница 1: ...Oracle HTTP Server Administrator s Guide 10g Release 1 10 1 Part No B12255 01 December 2003 ...
Страница 12: ...xii ...
Страница 22: ...xxii ...
Страница 30: ...Starting Stopping and Restarting Oracle HTTP Server 1 8 Oracle HTTP Server Administrator s Guide ...
Страница 38: ...About htaccess Files 2 8 Oracle HTTP Server Administrator s Guide ...
Страница 52: ...Getting Information about Processes 4 8 Oracle HTTP Server Administrator s Guide ...
Страница 60: ...Configuring Reverse Proxies and Load Balancers 5 8 Oracle HTTP Server Administrator s Guide ...
Страница 70: ...Specifying Log Files 6 10 Oracle HTTP Server Administrator s Guide ...
Страница 164: ...Security Services Implemented Within Oracle HTTP Server 8 34 Oracle HTTP Server Administrator s Guide ...
Страница 170: ...9 6 Oracle HTTP Server Administrator s Guide ...
Страница 178: ...opmn xml A 8 Oracle HTTP Server Administrator s Guide ...
Страница 211: ...Glossary 9 X 509 Public keys can be formed in various data formats The X 509 v3 format is one such popular format ...
Страница 212: ...Glossary 10 ...
Страница 224: ...Index 12 ...