Dibatalkan

Dregex

We are moving a site from an old cms to drupal and need the regex url rewrite/redirect statements to handle the following.

(1. Incoming url contains a ",")

[url removed, login to view],3458,0,0,1,0

rewrites & redirects to [url removed, login to view]

(2. The word following "?" is found in a mapped list and the backreference is used.)

[url removed, login to view]

rewrites & redirects to [url removed, login to view]

(3. The word following the "?" is found but cannot be used as a backreference.)

[url removed, login to view]

rewrites & redirects to [url removed, login to view]

All 3 expressions may have to be applied. If a url contains a comma the first expression is executed and the rule applications stop. If no comma is present the second rule is tested against a map of terms. If no match is found then the third rule is tested against a second map of terms. If no match is found a page-not-found error is returned.

We have used 1 single map in a similar way with the following code:

IN [url removed, login to view]:

RewriteMap rwmap dbm:/home/clientid/rewrite/[url removed, login to view]

IN .HTACCESS:

RewriteEngine On

RewriteCond ${rwmap:$1} >""

RewriteRule (.*)(.html)$ ${rwmap:$1}

To be clear:

Urls with a comma can use the backreference to create the rw/rd, as an terms found in the first map. Urls not found by the 1st or 2nd expressions will be manually mapped by listing both the originating url and the rw/rd url. We anticipate the map files to be large and we will manually assemble them.

Kemahiran: Sistem Admin

Lihat lebih lanjut: single match, regex match list, regex is, regex in c, regex c, old second, regex &, index php id, taxonomy, Regex, expressions, DBM, com single word, c++ regex, c regex, php regex html, files drupal html, html single page cms, html assemble, rewrite rule redirect, rewrite rule, redirects error, drupal redirect page, node stop, html regex

Tentang Majikan:
( 9 ulasan ) san diego, United States

ID Projek: #327548