Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (12 sloc) 534 Bytes
RewriteEngine on
Options +FollowSymLinks
#disallow access to cache and to prephp files
RewriteRule ^cache/ - [F]
# redirect all requests to the test/ directory to prephp
# check whether the file exists
RewriteCond %{REQUEST_FILENAME} -s
# and then pass the absolute path
RewriteRule ^test/.*\.php$ prephp/prephp.php?prephp_path=%{REQUEST_FILENAME} [QSA,L]
# template for redirecting all request within a directory:
# RewriteCond %{REQUEST_FILENAME} -s
# RewriteRule \.php$ path/to/prephp.php?prephp_path=%{REQUEST_FILENAME} [QSA,L]