Changeset 40339 in spip-zone


Ignore:
Timestamp:
Aug 28, 2010, 2:01:41 PM (9 years ago)
Author:
gilles.vincent@…
Message:

Si les numeros ne se suivent pas, ca ne fonctionne pas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _outils_/wizard_Cherokee/wizards/spip.py

    r40327 r40339  
    5151
    5252CONFIG_DIR = """
    53 %(pre_rule_plus400)s!match = fullpath
    54 %(pre_rule_plus400)s!match!fullpath!1 = %(web_dir)s/ecrire
    55 %(pre_rule_plus400)s!match!fullpath!1 = %(web_dir)s/ecrire/
    56 %(pre_rule_plus400)s!handler = redir
    57 %(pre_rule_plus400)s!handler!rewrite!1!show = 0
    58 %(pre_rule_plus400)s!handler!rewrite!1!substring = $1/spip.php
    59 
    60 %(pre_rule_plus3)s!document_root = %(local_dir)s
    61 %(pre_rule_plus300)s!match = directory
    62 %(pre_rule_plus300)s!match!directory = %(web_dir)s
    63 %(pre_rule_plus300)s!match!final = 0
    6453
    6554# Forbidden access to /tmp and /config
    6655
    67 %(pre_rule_plus200)s!match = or
    68 %(pre_rule_plus200)s!match!left = directory
    69 %(pre_rule_plus200)s!match!left!directory = %(web_dir)s/tmp
    70 %(pre_rule_plus200)s!match!right = directory
    71 %(pre_rule_plus200)s!match!right!directory = %(web_dir)s/config
    72 %(pre_rule_plus200)s!handler = custom_error
    73 %(pre_rule_plus200)s!handler!error = 403
     56%(pre_rule_plus2)s!match = or
     57%(pre_rule_plus2)s!match!left = directory
     58%(pre_rule_plus2)s!match!left!directory = %(web_dir)s/tmp
     59%(pre_rule_plus2)s!match!right = directory
     60%(pre_rule_plus2)s!match!right!directory = %(web_dir)s/config
     61%(pre_rule_plus2)s!handler = custom_error
     62%(pre_rule_plus2)s!handler!error = 403
    7463
    7564# Forbidden access to .svn
    7665
    77 %(pre_rule_plus100)s!match = request
    78 %(pre_rule_plus100)s!match!request = %(web_dir)s/(.*/)?\.svn
    79 %(pre_rule_plus100)s!handler = custom_error
    80 %(pre_rule_plus100)s!handler!error = 403
     66%(pre_rule_plus1)s!match = request
     67%(pre_rule_plus1)s!match!request = %(web_dir)s/(.*/)?\.svn
     68%(pre_rule_plus1)s!handler = custom_error
     69%(pre_rule_plus1)s!handler!error = 403
    8170
    8271# The PHP rule comes here
    8372
    84 %(pre_rule_minus100)s!match = and
    85 %(pre_rule_minus100)s!match!final = 1
    86 %(pre_rule_minus100)s!match!left = directory
    87 %(pre_rule_minus100)s!match!left!directory = %(web_dir)s
    88 %(pre_rule_minus100)s!match!right = exists
    89 %(pre_rule_minus100)s!match!right!iocache = 1
    90 %(pre_rule_minus100)s!match!right!match_any = 1
    91 %(pre_rule_minus100)s!match!right!match_index_files = 0
    92 %(pre_rule_minus100)s!match!right!match_only_files = 1
    93 %(pre_rule_minus100)s!handler = file
    94 %(pre_rule_minus100)s!handler!iocache = 1
     73%(pre_rule_minus1)s!match = and
     74%(pre_rule_minus1)s!match!final = 1
     75%(pre_rule_minus1)s!match!left = directory
     76%(pre_rule_minus1)s!match!left!directory = %(web_dir)s
     77%(pre_rule_minus1)s!match!right = exists
     78%(pre_rule_minus1)s!match!right!iocache = 1
     79%(pre_rule_minus1)s!match!right!match_any = 1
     80%(pre_rule_minus1)s!match!right!match_index_files = 0
     81%(pre_rule_minus1)s!match!right!match_only_files = 1
     82%(pre_rule_minus1)s!handler = file
     83%(pre_rule_minus1)s!handler!iocache = 1
    9584
    9685# URLs "propres", "propres2", "libres", "arbo"
    9786
    98 %(pre_rule_minus200)s!match = request
    99 %(pre_rule_minus200)s!match!request = %(web_dir)s/[^\.]+(\.html)?$
    100 %(pre_rule_minus200)s!handler = redir
    101 %(pre_rule_minus200)s!handler!rewrite!1!regex = %(web_dir)s/[^\.]+(\.html)?$
    102 %(pre_rule_minus200)s!handler!rewrite!1!show = 0
    103 %(pre_rule_minus200)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?url_propre=$0
     87%(pre_rule_minus10)s!match = request
     88%(pre_rule_minus10)s!match!request = %(web_dir)s/[^\.]+(\.html)?$
     89%(pre_rule_minus10)s!handler = redir
     90%(pre_rule_minus10)s!handler!rewrite!1!regex = %(web_dir)s/[^\.]+(\.html)?$
     91%(pre_rule_minus10)s!handler!rewrite!1!show = 0
     92%(pre_rule_minus10)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?url_propre=$0
    10493
    10594# Compatibility with "html" URLs for a nice transition
    10695
    107 %(pre_rule_minus300)s!match = request
    108 %(pre_rule_minus300)s!match!request = %(web_dir)s/(rubrique|article|breve|auteur|mot|site)([0-9]+)(\.html)?$
    109 %(pre_rule_minus300)s!handler = redir
    110 %(pre_rule_minus300)s!handler!rewrite!1!show = 0
    111 %(pre_rule_minus300)s!handler!rewrite!1!regex = %(web_dir)s/(rubrique|article|breve|auteur|mot|site)([0-9]+)(\.html)?$
    112 %(pre_rule_minus300)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?page=$1&id_$1=$2
     96%(pre_rule_minus7)s!match = request
     97%(pre_rule_minus7)s!match!request = %(web_dir)s/(rubrique|article|breve|auteur|mot|site)([0-9]+)(\.html)?$
     98%(pre_rule_minus7)s!handler = redir
     99%(pre_rule_minus7)s!handler!rewrite!1!show = 0
     100%(pre_rule_minus7)s!handler!rewrite!1!regex = %(web_dir)s/(rubrique|article|breve|auteur|mot|site)([0-9]+)(\.html)?$
     101%(pre_rule_minus7)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?page=$1&id_$1=$2
    113102
    114103# ping http://site/1234 => article1234
    115104
    116 %(pre_rule_minus400)s!match = request
    117 %(pre_rule_minus400)s!match!request = %(web_dir)s/([1-9][0-9]*)$
    118 %(pre_rule_minus400)s!handler = redir
    119 %(pre_rule_minus400)s!handler!rewrite!1!show = 0
    120 %(pre_rule_minus400)s!handler!rewrite!1!regex = %(web_dir)s/([1-9][0-9]*)$
    121 %(pre_rule_minus400)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?action=redirect&type=article&id=$1
     105%(pre_rule_minus9)s!match = request
     106%(pre_rule_minus9)s!match!request = %(web_dir)s/([1-9][0-9]*)$
     107%(pre_rule_minus9)s!handler = redir
     108%(pre_rule_minus9)s!handler!rewrite!1!show = 0
     109%(pre_rule_minus9)s!handler!rewrite!1!regex = %(web_dir)s/([1-9][0-9]*)$
     110%(pre_rule_minus9)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?action=redirect&type=article&id=$1
    122111
    123112# Standards files (if not presents)
    124113
    125 %(pre_rule_minus500)s!match = request
    126 %(pre_rule_minus500)s!match!request = %(web_dir)s/(robots\.txt|favicon\.ico|sitemap\.xml)?$
    127 %(pre_rule_minus500)s!handler = redir
    128 %(pre_rule_minus500)s!handler!rewrite!1!show = 0
    129 %(pre_rule_minus500)s!handler!rewrite!1!regex = %(web_dir)s/(robots\.txt|favicon\.ico|sitemap\.xml)?$
    130 %(pre_rule_minus500)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?page=$1
     114%(pre_rule_minus11)s!match = request
     115%(pre_rule_minus11)s!match!request = %(web_dir)s/(robots\.txt|favicon\.ico|sitemap\.xml)?$
     116%(pre_rule_minus11)s!handler = redir
     117%(pre_rule_minus11)s!handler!rewrite!1!show = 0
     118%(pre_rule_minus11)s!handler!rewrite!1!regex = %(web_dir)s/(robots\.txt|favicon\.ico|sitemap\.xml)?$
     119%(pre_rule_minus11)s!handler!rewrite!1!substring = %(web_dir)s/spip.php?page=$1
    131120
    132121"""
     
    139128# Forbidden access to /tmp and /config
    140129
    141 %(pre_rule_plus200)s!match = or
    142 %(pre_rule_plus200)s!match!left = directory
    143 %(pre_rule_plus200)s!match!left!directory = /tmp
    144 %(pre_rule_plus200)s!match!right = directory
    145 %(pre_rule_plus200)s!match!right!directory = /config
    146 %(pre_rule_plus200)s!handler = custom_error
    147 %(pre_rule_plus200)s!handler!error = 403
     130%(pre_rule_plus2)s!match = or
     131%(pre_rule_plus2)s!match!left = directory
     132%(pre_rule_plus2)s!match!left!directory = /tmp
     133%(pre_rule_plus2)s!match!right = directory
     134%(pre_rule_plus2)s!match!right!directory = /config
     135%(pre_rule_plus2)s!handler = custom_error
     136%(pre_rule_plus2)s!handler!error = 403
    148137
    149138# Forbidden access to .svn
    150139
    151 %(pre_rule_plus100)s!match = request
    152 %(pre_rule_plus100)s!match!request = /(.*/)?\.svn
    153 %(pre_rule_plus100)s!handler = custom_error
    154 %(pre_rule_plus100)s!handler!error = 403
     140%(pre_rule_plus1)s!match = request
     141%(pre_rule_plus1)s!match!request = /(.*/)?\.svn
     142%(pre_rule_plus1)s!handler = custom_error
     143%(pre_rule_plus1)s!handler!error = 403
    155144
    156145# The PHP rule comes here
     
    189178# Apache-like redirection, for the document root
    190179
    191 %(pre_rule_minus10)s!match = fullpath
    192 %(pre_rule_minus10)s!match!fullpath!1 = /
     180%(pre_rule_minus5)s!match = fullpath
     181%(pre_rule_minus5)s!match!fullpath!1 = /
     182%(pre_rule_minus5)s!handler = redir
     183%(pre_rule_minus5)s!handler!rewrite!1!regex = ^/$
     184%(pre_rule_minus5)s!handler!rewrite!1!substring = spip.php
     185%(pre_rule_minus5)s!handler!rewrite!1!show = 0
     186%(pre_rule_minus5)s!handler!rewrite!2!regex = ^/\?(.*)$
     187%(pre_rule_minus5)s!handler!rewrite!2!substring = spip.php?$1
     188%(pre_rule_minus5)s!handler!rewrite!2!show = 0
     189%(pre_rule_minus5)s!encoder!deflate = allow
     190%(pre_rule_minus5)s!encoder!gzip = allow
     191
     192# Apache-like redirection, for the admin directory
     193
     194%(pre_rule_minus6)s!match = request
     195%(pre_rule_minus6)s!match!request = ^/ecrire
     196%(pre_rule_minus6)s!handler = redir
     197%(pre_rule_minus6)s!handler!rewrite!3!regex = ^/ecrire/\?(.*)$
     198%(pre_rule_minus6)s!handler!rewrite!3!substring = /ecrire/index.php?$1
     199%(pre_rule_minus6)s!handler!rewrite!3!show = 0
     200%(pre_rule_minus6)s!handler!rewrite!4!regex = ^/ecrire/$
     201%(pre_rule_minus6)s!handler!rewrite!4!substring = /ecrire/index.php
     202%(pre_rule_minus6)s!handler!rewrite!4!show = 0
     203%(pre_rule_minus6)s!handler!rewrite!5!regex = ^/ecrire$
     204%(pre_rule_minus6)s!handler!rewrite!5!substring = /ecrire/index.php
     205%(pre_rule_minus6)s!handler!rewrite!5!show = 0
     206
     207# Compatibility with "html" URLs for a nice transition 
     208
     209%(pre_rule_minus7)s!match = request
     210%(pre_rule_minus7)s!match!request = /(rubrique|article|breve|auteur|mot|site)(\d+)(\.html)?$
     211%(pre_rule_minus7)s!handler = redir
     212%(pre_rule_minus7)s!handler!rewrite!1!regex = /(rubrique|article|breve|auteur|mot|site)(\d+)(\.html)?\?(.*)$
     213%(pre_rule_minus7)s!handler!rewrite!1!substring = /spip.php?page=$1&id_$1=$2&$4
     214%(pre_rule_minus7)s!handler!rewrite!1!show = 0
     215%(pre_rule_minus7)s!handler!rewrite!2!regex = /(rubrique|article|breve|auteur|mot|site)(\d+)(\.html)?$
     216%(pre_rule_minus7)s!handler!rewrite!2!substring = /spip.php?page=$1&id_$1=$2
     217%(pre_rule_minus7)s!handler!rewrite!2!show = 0
     218%(pre_rule_minus7)s!encoder!deflate = allow
     219%(pre_rule_minus7)s!encoder!gzip = allow
     220
     221# ping http://site/1234 => article1234
     222
     223%(pre_rule_minus9)s!match = request
     224%(pre_rule_minus9)s!match!request = /(\d+)$
     225%(pre_rule_minus9)s!handler = redir
     226%(pre_rule_minus9)s!handler!rewrite!1!show = 0
     227%(pre_rule_minus9)s!handler!rewrite!1!regex = /(\d+)$
     228%(pre_rule_minus9)s!handler!rewrite!1!substring = /spip.php?action=redirect&id=$1&type=article
     229%(pre_rule_minus9)s!encoder!deflate = allow
     230%(pre_rule_minus9)s!encoder!gzip = allow
     231
     232# URLs "propres", "propres2", "libres", "arbo"
     233
     234%(pre_rule_minus10)s!match = request
     235%(pre_rule_minus10)s!match!request = /[^\.]+(\.html)?$
    193236%(pre_rule_minus10)s!handler = redir
    194 %(pre_rule_minus10)s!handler!rewrite!1!regex = ^/$
    195 %(pre_rule_minus10)s!handler!rewrite!1!substring = spip.php
     237%(pre_rule_minus10)s!handler!rewrite!1!regex = /([^\.]+)(\.html)?\?(.*)$
     238%(pre_rule_minus10)s!handler!rewrite!1!substring = /spip.php?url_propre=$1&$2
    196239%(pre_rule_minus10)s!handler!rewrite!1!show = 0
    197 %(pre_rule_minus10)s!handler!rewrite!2!regex = ^/\?(.*)$
    198 %(pre_rule_minus10)s!handler!rewrite!2!substring = spip.php?$1
     240%(pre_rule_minus10)s!handler!rewrite!2!regex = /([^\.]+)(\.html)?$
     241%(pre_rule_minus10)s!handler!rewrite!2!substring = /spip.php?url_propre=$1
    199242%(pre_rule_minus10)s!handler!rewrite!2!show = 0
    200243%(pre_rule_minus10)s!encoder!deflate = allow
    201244%(pre_rule_minus10)s!encoder!gzip = allow
    202245
    203 # Apache-like redirection, for the admin directory
    204 
    205 %(pre_rule_minus20)s!match = request
    206 %(pre_rule_minus20)s!match!request = ^/ecrire
    207 %(pre_rule_minus20)s!handler = redir
    208 %(pre_rule_minus20)s!handler!rewrite!3!regex = ^/ecrire/\?(.*)$
    209 %(pre_rule_minus20)s!handler!rewrite!3!substring = /ecrire/index.php?$1
    210 %(pre_rule_minus20)s!handler!rewrite!3!show = 0
    211 %(pre_rule_minus20)s!handler!rewrite!4!regex = ^/ecrire/$
    212 %(pre_rule_minus20)s!handler!rewrite!4!substring = /ecrire/index.php
    213 %(pre_rule_minus20)s!handler!rewrite!4!show = 0
    214 %(pre_rule_minus20)s!handler!rewrite!5!regex = ^/ecrire$
    215 %(pre_rule_minus20)s!handler!rewrite!5!substring = /ecrire/index.php
    216 %(pre_rule_minus20)s!handler!rewrite!5!show = 0
    217 
    218 # Compatibility with "html" URLs for a nice transition 
    219 
    220 %(pre_rule_minus300)s!match = request
    221 %(pre_rule_minus300)s!match!request = /(rubrique|article|breve|auteur|mot|site)(\d+)(\.html)?$
    222 %(pre_rule_minus300)s!handler = redir
    223 %(pre_rule_minus300)s!handler!rewrite!1!regex = /(rubrique|article|breve|auteur|mot|site)(\d+)(\.html)?\?(.*)$
    224 %(pre_rule_minus300)s!handler!rewrite!1!substring = /spip.php?page=$1&id_$1=$2&$4
    225 %(pre_rule_minus300)s!handler!rewrite!1!show = 0
    226 %(pre_rule_minus300)s!handler!rewrite!2!regex = /(rubrique|article|breve|auteur|mot|site)(\d+)(\.html)?$
    227 %(pre_rule_minus300)s!handler!rewrite!2!substring = /spip.php?page=$1&id_$1=$2
    228 %(pre_rule_minus300)s!handler!rewrite!2!show = 0
    229 %(pre_rule_minus300)s!encoder!deflate = allow
    230 %(pre_rule_minus300)s!encoder!gzip = allow
    231 
    232 # ping http://site/1234 => article1234
    233 
    234 %(pre_rule_minus400)s!match = request
    235 %(pre_rule_minus400)s!match!request = /(\d+)$
    236 %(pre_rule_minus400)s!handler = redir
    237 %(pre_rule_minus400)s!handler!rewrite!1!show = 0
    238 %(pre_rule_minus400)s!handler!rewrite!1!regex = /(\d+)$
    239 %(pre_rule_minus400)s!handler!rewrite!1!substring = /spip.php?action=redirect&id=$1&type=article
    240 %(pre_rule_minus400)!encoder!deflate = allow
    241 %(pre_rule_minus400)!encoder!gzip = allow
    242 
    243 # URLs "propres", "propres2", "libres", "arbo"
    244 
    245 %(pre_rule_minus200)s!match = request
    246 %(pre_rule_minus200)s!match!request = /[^\.]+(\.html)?$
    247 %(pre_rule_minus200)s!handler = redir
    248 %(pre_rule_minus200)s!handler!rewrite!1!regex = /([^\.]+)(\.html)?\?(.*)$
    249 %(pre_rule_minus200)s!handler!rewrite!1!substring = /spip.php?url_propre=$1&$2
    250 %(pre_rule_minus200)s!handler!rewrite!1!show = 0
    251 %(pre_rule_minus200)s!handler!rewrite!2!regex = /([^\.]+)(\.html)?$
    252 %(pre_rule_minus200)s!handler!rewrite!2!substring = /spip.php?url_propre=$1
    253 %(pre_rule_minus200)s!handler!rewrite!2!show = 0
    254 %(pre_rule_minus200)s!encoder!deflate = allow
    255 %(pre_rule_minus200)s!encoder!gzip = allow
    256 
    257246# Standards files (if not presents)
    258247
    259 %(pre_rule_minus500)s!match = request
    260 %(pre_rule_minus500)s!match!request = /(robots\.txt|favicon\.ico|sitemap\.xml)?$
    261 %(pre_rule_minus500)s!handler = redir
    262 %(pre_rule_minus500)s!handler!rewrite!1!show = 0
    263 %(pre_rule_minus500)s!handler!rewrite!1!regex = /(robots\.txt|favicon\.ico|sitemap\.xml)?$
    264 %(pre_rule_minus500)s!handler!rewrite!1!substring = /spip.php?page=$1
     248%(pre_rule_minus11)s!match = request
     249%(pre_rule_minus11)s!match!request = /(robots\.txt|favicon\.ico|sitemap\.xml)?$
     250%(pre_rule_minus11)s!handler = redir
     251%(pre_rule_minus11)s!handler!rewrite!1!show = 0
     252%(pre_rule_minus11)s!handler!rewrite!1!regex = /(robots\.txt|favicon\.ico|sitemap\.xml)?$
     253%(pre_rule_minus11)s!handler!rewrite!1!substring = /spip.php?page=$1
    265254
    266255"""
Note: See TracChangeset for help on using the changeset viewer.