Prev | Current Page 296 | Next

Emilian Balanescu and Cristian Darie

"Beginning PHP and MySQL E-Commerce: From Novice to Professional, Second Edition"

Table 7-3 lists the possible RewriteRule arguments. These
rewrite flags must always be placed in square brackets at the end of an individual rule.
CHAPTER 7 ?–  SEARCH ENGINE OPTIMIZATION 197
Table 7-3. RewriteRule Options
RewriteRule Option Significance Description
R Redirect Sends an HTTP redirect.
F Forbidden Forbids access to the URL.
G Gone Marks the URL as gone.
P Proxy Passes the URL to mod_proxy.
L Last Stops processing further rules.
N Next Starts processing again from the first rule, but using the
current rewritten URL.
C Chain Links the current rule with the following one.
T Type Forces the mentioned MIME type.
NS Nosubreq Applies only if no internal subrequest is performed.
NC Nocase URL matching is case insensitive.
QSA Qsappend Appends a query string part to the new URL instead of
replacing it.
PT Passthrough Passes the rewritten URL to another Apache module for
further processing.
S Skip Skips the next rule.
E Env Sets an environment variable.
RewriteRule commands are processed in sequential order as they are written in the configuration
file. If you want to make sure that a rule is the last one processed in case amatch is
found for it, you need to use the [L] flag.
This flag is particularly useful if you have a long list of RewriteRule commands, because
using [L] improves performance and prevents mod_rewrite from processing all the RewriteRule
commands that follow once a match is found.


Pages:
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
zakłady bukmacherskie Wczasy nad morzem oferty spa Spa Ciechocinek kolokacja rack