Hello.
I would like apache to render %{DOCUMENT_ROOT}/cache/%1.html
if %1 is the request path. My whole site is in a sub directory called cache_test and I have the following .htaccess file. But the RewriteRule on line 7 and 11 won't match :(.
Thank you in advance for any advance! Kind regards, Nicklas
1 RewriteEngine On
2 RewriteBase /cache_test/
3
4 RewriteCond %{THE_REQUEST} ^(GET|HEAD)
5 RewriteCond %{REQUEST_URI} ^/([^.]+)$
6 RewriteCond %{DOCUMENT_ROOT}/cache/%1.html -f
7 RewriteRule ^/[^.]+$ /cache/%1.html [QSA,L]
8
9 RewriteCond %{THE_REQUEST} ^(GET|HEAD)
10 RewriteCond %{DOCUMENT_ROOT}/cache/index.html -f
11 RewriteRule ^/$ /cache/index.html [QSA,L]
12
13 RewriteRule (.*/cache_test)$ $1/
14 RewriteRule ^$ index.html [QSA]
15 RewriteRule ^([^.]+)$ $1.html [QSA]
16 RewriteCond %{REQUEST_FILENAME} !-f
17 RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]