Added original date and updated date to bookmark output if different.
[scuttle] / .htaccess
1 #
2 # Apache/PHP settings for Scuttle
3 #
4
5 # Don't show directory listings for URLs which map to a directory.
6 Options -Indexes
7
8 # Follow symbolic links in this directory.
9 Options +FollowSymLinks
10
11 # Force simple error message for requests for non-existent favicon.ico.
12 <Files favicon.ico>
13   # There is no end quote below, for compatibility with Apache 1.3.
14   ErrorDocument 404 "The requested file favicon.ico was not found.
15 </Files>
16
17 # Set the default handler.
18 DirectoryIndex index.php
19
20 # Override PHP settings.
21
22 # PHP 4, Apache 1.
23 <IfModule mod_php4.c>
24   php_value magic_quotes_gpc                0
25   php_value register_globals                0
26   php_value session.auto_start              0
27   php_value mbstring.http_input             pass
28   php_value mbstring.http_output            pass
29   php_value mbstring.encoding_translation   0
30 </IfModule>
31
32 # PHP 4, Apache 2.
33 <IfModule sapi_apache2.c>
34   php_value magic_quotes_gpc                0
35   php_value register_globals                0
36   php_value session.auto_start              0
37   php_value mbstring.http_input             pass
38   php_value mbstring.http_output            pass
39   php_value mbstring.encoding_translation   0
40 </IfModule>
41
42
43 # Requires mod_expires to be enabled.
44 <IfModule mod_expires.c>
45   # Enable expirations.
46   ExpiresActive On
47
48   # Cache all files for 2 weeks after access (A).
49   ExpiresDefault A1209600
50
51   <FilesMatch \.php$>
52     # Do not allow PHP scripts to be cached unless they explicitly send cache
53     # headers themselves. Otherwise all scripts would have to overwrite the
54     # headers set by mod_expires if they want another caching behavior.
55     ExpiresActive Off
56   </FilesMatch>
57 </IfModule>
58
59 # Various rewrite rules.
60 <IfModule mod_rewrite.c>
61   RewriteEngine on
62
63   # If your site can be accessed both with and without the 'www.' prefix, you
64   # can use one of the following settings to redirect users to your preferred
65   # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
66   #
67   # To redirect all users to access the site WITH the 'www.' prefix,
68   # (http://example.com/... will be redirected to http://www.example.com/...)
69   # adapt and uncomment the following:
70   # RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
71   # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
72   #
73   # To redirect all users to access the site WITHOUT the 'www.' prefix,
74   # (http://www.example.com/... will be redirected to http://example.com/...)
75   # uncomment and adapt the following:
76   # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
77   # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301]
78
79   # Modify the RewriteBase if you are using Scuttle in a subdirectory or in a
80   # VirtualDocumentRoot and the rewrite rules are not working properly.
81   # For example if your site is at http://example.com/scuttle uncomment and
82   # modify the following line:
83   # RewriteBase /scuttle
84   #
85   # If your site is running in a VirtualDocumentRoot at http://example.com/,
86   # uncomment the following line:
87   # RewriteBase /
88
89   # Rewrite clean URLs onto real files.
90   RewriteCond %{REQUEST_FILENAME} !-f
91   RewriteCond %{REQUEST_FILENAME} !-d
92   RewriteCond %{REQUEST_URI} !=/favicon.ico
93   RewriteCond %{REQUEST_FILENAME}.php -f
94   RewriteRule ^([^/]+)/?(.*) $1.php/$2 [L,QSA]
95 </IfModule>

Benjamin Mako Hill || Want to submit a patch?