[ Index ]
 

Code source de Typo3 4.1.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/misc/ -> advanced.htaccess (source)

   1  #####
   2  # 
   3  # Example .htaccess file
   4  # 
   5  # This file contains a collection of almost everything you will need
   6  # for optimising TYPO3:
   7  # 
   8  # - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
   9  # - PHP optimisation
  10  # 
  11  # If you want to use it, you'll need to rename this file to '.htaccess'.
  12  # (To make this work you will need to adjust the 'AllowOverride'
  13  # directive in your Apache configuration file.)
  14  # 
  15  # IMPORTANT: You may need to change this file depending on your TYPO3
  16  # installation!
  17  # 
  18  # You should change every occurance of TYPO3root/ to the location where you
  19  # have your website in. For example:
  20  # If you have your website located at http://mysite.com/
  21  # then your TYPO3root/ is just empty (remove 'TYPO3root/')
  22  # If you have your website located at http://mysite.com/some/path/
  23  # then your TYPO3root/ is some/path/ (search and replace)
  24  # 
  25  # If you have problems with this file, try using the minimal
  26  # mod_rewrite.htaccess which is located in the typo3_src/misc/
  27  # directory of this installation.
  28  # 
  29  # You can also use this configuration in your httpd.conf, but you'll have
  30  # to modify some lines, see the comments (search for 'httpd.conf')
  31  # 
  32  # Using rewriting in your httpd.conf is much faster, btw.
  33  # 
  34  # Questions about this file go to the matching Install mailing list,
  35  # see http://typo3.org/documentation/mailing-lists/
  36  # 
  37  ####
  38  
  39  ### Begin: Rewrite stuff ###
  40  
  41  # Enable URL rewriting
  42  RewriteEngine On
  43  
  44  # To assist in debugging rewriting, you could use these lines
  45  # DON'T enable it for production!
  46  # This will only work in httpd.conf, not in .htaccess files
  47  #RewriteLog /var/log/apache/rewrite.log
  48  #RewriteLogLevel 9
  49  
  50  # If you use the RealUrl extension, then you'll have to enable the next line.
  51  # You will have to change this path if your TYPO3 installation is located
  52  # in a subdirectory of the website root.
  53  # 
  54  # If you place this in httpd.conf, you cannot use this directive in any case!
  55  #RewriteBase /
  56  
  57  # Stop rewrite processing if we are in the typo3/ directory
  58  # For httpd.conf, use this line instead of the next one:
  59  # RewriteRule ^/TYPO3root/(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
  60  RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
  61  
  62  # Redirect http://mysite/typo3 to http://mysite/typo3/index_re.php
  63  # and stop the rewrite processing
  64  # For httpd.conf, use this line instead of the next one:
  65  # RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
  66  RewriteRule ^typo3$ typo3/index_re.php [L]
  67  
  68  # If the file/symlink/directory does not exist => Redirect to index.php
  69  # Important note: If you copy/paste this into httpd.conf instead
  70  # of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
  71  # '%{REQUEST_FILENAME}' part.
  72  RewriteCond %{REQUEST_FILENAME} !-f
  73  RewriteCond %{REQUEST_FILENAME} !-d
  74  RewriteCond %{REQUEST_FILENAME} !-l
  75  
  76  # Main URL rewriting.
  77  
  78  # If you use Windows and SimulateStaticDocuments do not work, try adding a
  79  # slash (/) right before 'index.php' below.
  80  
  81  # The example shows how to rewrite only *.html and *.pdf files to index.php
  82  # This may be helpful when using an extension that can generate PDF files
  83  # on the fly.
  84  # Example: RewriteRule .*\.(html|pdf)$ index.php [L]
  85  
  86  # For httpd.conf, use this line instead of the next one that has no '#':
  87  # RewriteRule .* /TYPO3root/index.php [L]
  88  
  89  # For use with the RealUrl extension, you might need to remove the
  90  # RewriteBase directive somewhere above and use this line instead of the
  91  # next one:
  92  # RewriteRule .* /index.php [L]
  93  
  94  RewriteRule .* index.php [L]
  95  
  96  ### End: Rewrite stuff ###
  97  
  98  ### Begin: PHP optimisation ###
  99  
 100  # All features below are left to the default if you don't change this.
 101  # Simply remove the comment marks if you want to use some/all of these
 102  # settings
 103  
 104  # The PHP developers recommend disabling this feature. Do that.
 105  # It's deprecated and is likely to be unsupported in future versions of PHP.
 106  #php_flag allow_call_time_pass_reference off
 107  
 108  # TYPO3 works fine with register_globals turned off.
 109  # This is highly recommended!
 110  #php_flag register_globals off
 111  
 112  # PHP may not declare the argv & argc variables (that would contain the GET
 113  # information).
 114  # TYPO3 doesn't need this, so just turn it off.
 115  #php_flag register_argc_argv off
 116  
 117  # Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
 118  #php_flag magic_quotes_gpc off
 119  
 120  # Order in which PHP registers GET, POST, Cookie and Built-in variables
 121  #php_value variables_order GPCS
 122  
 123  ### End: PHP optimisation ###
 124  
 125  ### Begin: Miscellaneous ###
 126  
 127  # Make sure that directory listings are disabled
 128  #Options -Indexes
 129  
 130  # There is a problem with Internet Explorer and mod_gzip on Apache servers.
 131  # For more information, see
 132  # http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
 133  #mod_gzip_item_exclude file \.css$
 134  #mod_gzip_item_exclude file \.png$
 135  #mod_gzip_item_exclude file \.gif$
 136  #mod_gzip_item_exclude file \.jpg$
 137  #mod_gzip_item_exclude file \.jpeg$
 138  #mod_gzip_item_exclude file \.js$
 139  
 140  ### End: Miscellaneous ###
 141  
 142  # Add your own rules here
 143  # ...


Généré le : Sun Nov 25 17:13:16 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics