Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
Cache hit with both foo/bar and foo/bar/ when URL_SUFFIX is not set. …
Browse files Browse the repository at this point in the history
…Adjust paths for wolf.
  • Loading branch information
tuupola committed Sep 22, 2010
1 parent 8a0c3c8 commit e6db357
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions views/documentation.php
Expand Up @@ -10,8 +10,9 @@
<code><pre>
<?php if (trim(URL_SUFFIX)) { ?>

Options +FollowSymLinks
php_flag magic_quotes_gpc off
AddDefaultCharset UTF-8
Options -Indexes +FollowSymLinks

DirectoryIndex index<?php print funky_cache_suffix() ?> index.php

Expand Down Expand Up @@ -42,17 +43,14 @@
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-d
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-l
# Main URL rewriting.
<?php if (version_compare(FROG_VERSION, '0.9.5', '<')) { ?>
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
<?php } else { ?>
RewriteRule ^(.*)$ index.php?PAGE=$1 [L,QSA]
<?php } ?>
RewriteRule ^(.*)$ index.php?WOLFPAGE=$1 [L,QSA]
&lt;/IfModule&gt;
<?php } else { ?>
DirectorySlash Off

Options +FollowSymLinks
php_flag magic_quotes_gpc off
AddDefaultCharset UTF-8
Options -Indexes +FollowSymLinks

DirectoryIndex index<?php print funky_cache_suffix() ?> index.php

Expand All @@ -74,20 +72,18 @@

# Rewrite to check for cached page.
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{DOCUMENT_ROOT}<?php print funky_cache_folder() ?>%{REQUEST_URI}<?php print funky_cache_suffix() ?> -f
RewriteRule ^(.*)$ <?php print funky_cache_folder() ?>$1<?php print funky_cache_suffix() ?> [L,QSA]
RewriteCond %{REQUEST_URI} (.*)/$ [or]
RewriteCond %{REQUEST_URI} (.*)$
RewriteCond %{DOCUMENT_ROOT}<?php print funky_cache_folder() ?>%1<?php print funky_cache_suffix() ?> -f
RewriteRule ^(.*)/?$ <?php print funky_cache_folder() ?>$1<?php print funky_cache_suffix() ?> [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
<?php if (!funky_cache_folder_is_root()): ?>
RewriteCond %{REQUEST_FILENAME} !-d
<?php endif; ?>
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
<?php if (version_compare(FROG_VERSION, '0.9.5', '<')) { ?>
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
<?php } else { ?>
RewriteRule ^(.*)$ index.php?PAGE=$1 [L,QSA]
<?php } ?>
RewriteRule ^(.*)$ index.php?WOLFPAGE=$1 [L,QSA]
&lt;/IfModule&gt;

<?php } ?>
Expand Down

0 comments on commit e6db357

Please sign in to comment.