2 # Apache/PHP settings for Scuttle
5 # Don't show directory listings for URLs which map to a directory.
8 # Follow symbolic links in this directory.
9 Options +FollowSymLinks
11 # Force simple error message for requests for non-existent 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.
17 # Set the default handler.
18 DirectoryIndex index.php
20 # Override PHP settings.
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
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
43 # Requires mod_expires to be enabled.
44 <IfModule mod_expires.c>
48 # Cache all files for 2 weeks after access (A).
49 ExpiresDefault A1209600
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.
59 # Various rewrite rules.
60 <IfModule mod_rewrite.c>
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:
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]
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]
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
85 # If your site is running in a VirtualDocumentRoot at http://example.com/,
86 # uncomment the following line:
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]