|
8 | 8 | #</FilesMatch>
|
9 | 9 |
|
10 | 10 | # Don't show directory listings for URLs which map to a directory.
|
11 |
| -#Options -Indexes |
| 11 | +Options -Indexes |
12 | 12 |
|
13 | 13 | # Follow symbolic links in this directory.
|
14 | 14 | Options +FollowSymLinks
|
15 | 15 |
|
16 |
| -# Customized error messages. |
17 |
| -#ErrorDocument 404 /index.html |
18 |
| - |
19 |
| -# Set the default handler. |
20 |
| -#DirectoryIndex index.html |
21 |
| - |
22 |
| -# Override PHP settings. More in sites/default/settings.php |
23 |
| -# but the following cannot be changed at runtime. |
24 |
| - |
25 |
| -# Requires mod_expires to be enabled. |
26 |
| -#<IfModule mod_expires.c> |
27 |
| -# # Enable expirations. |
28 |
| -# ExpiresActive On |
29 |
| -# # Cache all files for 2 weeks after access (A). |
30 |
| -# ExpiresDefault A1209600 |
31 |
| -# # Do not cache dynamically generated pages. |
32 |
| -# ExpiresByType text/html A1 |
33 |
| -#</IfModule> |
34 |
| - |
35 | 16 | # Various rewrite rules.
|
36 | 17 | <IfModule mod_rewrite.c>
|
37 | 18 | RewriteEngine on
|
38 | 19 |
|
39 |
| - # If your site can be accessed both with and without the 'www.' prefix, you |
40 |
| - # can use one of the following settings to redirect users to your preferred |
41 |
| - # URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option: |
42 |
| - # |
43 |
| - # To redirect all users to access the site WITH the 'www.' prefix, |
44 |
| - # (http://example.com/... will be redirected to http://www.example.com/...) |
45 |
| - # adapt and uncomment the following: |
46 |
| - # RewriteCond %{HTTP_HOST} ^example\.com$ [NC] |
47 |
| - # RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] |
48 |
| - # |
49 |
| - # To redirect all users to access the site WITHOUT the 'www.' prefix, |
50 |
| - # (http://www.example.com/... will be redirected to http://example.com/...) |
51 |
| - # uncomment and adapt the following: |
52 |
| - # RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] |
53 |
| - # RewriteRule ^(.*)$ http://example.com/$1 [L,R=301] |
54 |
| - |
55 |
| - # Modify the RewriteBase if you are using Drupal in a subdirectory or in a |
56 |
| - # VirtualDocumentRoot and the rewrite rules are not working properly. |
57 |
| - # For example if your site is at http://example.com/drupal uncomment and |
58 |
| - # modify the following line: |
59 |
| - # RewriteBase /drupal |
60 |
| - # |
61 |
| - # If your site is running in a VirtualDocumentRoot at http://example.com/, |
62 |
| - # uncomment the following line: |
63 |
| - # RewriteBase / |
64 |
| - |
65 |
| - # Rewrite old-style URLs of the form 'node.php?id=x'. |
66 |
| - #RewriteCond %{REQUEST_FILENAME} !-f |
67 |
| - #RewriteCond %{REQUEST_FILENAME} !-d |
68 |
| - #RewriteCond %{QUERY_STRING} ^id=([^&]+)$ |
69 |
| - #RewriteRule node.php index.php?q=node/view/%1 [L] |
70 |
| - |
71 |
| - # Rewrite old-style URLs of the form 'module.php?mod=x'. |
72 |
| - #RewriteCond %{REQUEST_FILENAME} !-f |
73 |
| - #RewriteCond %{REQUEST_FILENAME} !-d |
74 |
| - #RewriteCond %{QUERY_STRING} ^mod=([^&]+)$ |
75 |
| - #RewriteRule module.php index.php?q=%1 [L] |
| 20 | + RewriteCond %{REQUEST_FILENAME} !-f |
| 21 | + RewriteCond %{REQUEST_FILENAME} !-d |
| 22 | + RewriteCond %{REQUEST_URI} !\.html$ |
| 23 | + RewriteRule ^(.*)$ $1.html [L] |
76 | 24 |
|
77 |
| - RewriteCond %{REQUEST_FILENAME} -d |
78 |
| - RewriteCond ^([.*]/[^[.]*) $1.html |
79 | 25 |
|
80 |
| - # Rewrite current-style URLs of the form 'index.php?q=x'. |
81 |
| - #RewriteCond %{REQUEST_FILENAME} !-f |
82 |
| - #RewriteCond %{REQUEST_FILENAME} !-d |
83 |
| - #RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] |
84 | 26 | </IfModule>
|
85 | 27 |
|
86 | 28 | DefaultType text/html
|
|
0 commit comments