From: Joe Presbrey Date: Tue, 21 Aug 2007 21:47:33 +0000 (+0000) Subject: clean up htaccess X-Git-Url: http://andersk.mit.edu/gitweb/sql-web.git/commitdiff_plain/1c1d1ffe136706501910193a2bb526e8c426c8c2 clean up htaccess git-svn-id: svn://presbrey.mit.edu/sql/web/dev@140 a142d4bd-2cfb-0310-9673-cb33a7e74f58 --- diff --git a/.htaccess.dev b/.htaccess.dev index a438060..2e1c5cc 100644 --- a/.htaccess.dev +++ b/.htaccess.dev @@ -1,69 +1,12 @@ -#php_value auto_append_file "global.done.php" -#php_value auto_prepend_file "prepend.php" -#php_flag xdebug.remote_enable on -#php_flag xdebug.remote_autostart on -#php_value xdebug.remote_host "localhost" -#php_value xdebug.remote_port "9000" - RewriteEngine On RewriteBase /~sql/dev/ -#RewriteBase http://sql.mit.edu/ -#RewriteBase / - -#RewriteOptions MaxRedirects=1 - -#RewriteCond %{REQUEST_FILENAME}.php -f -#RewriteRule ^.* do/%{REQUEST_FILENAME} -#RewriteCond %{REQUEST_URI} !^/~administrator/mitsql/go/.+ - -##RewriteCond %{REQUEST_URI} -##RewriteCond %{REQUEST_FILENAME} !-s -#RewriteRule ^do/.+$ - [L] - -#RewriteCond %{IS_SUBREQ} !="true" -#RewriteRule ^.*$ do/index [R,L] - -##RewriteCond %{REQUEST_URI} ^.*/do/.+$ -##RewriteRule ^do/.+$ - [C] -#RewriteRule ^do/(.+)$ $1.php [PT,L] - -#RewriteRule ^do/(.+)$ $1.php [L] - -## attempt 2 -#RewriteCond %{REQUEST_URI} !^.*/do/.+$ -#RewriteRule ^.*$ do/index [R,L] -# -#RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /.+\.php\ HTTP -#RewriteRule \.php$ - [F] -# -##RewriteCond do/%{REQUEST_FILENAME}.php -f -#RewriteRule ^do/(.+)$ $1.php [L] - -# attempt 3 - -#RewriteRule \.php$ - [F,C] - -#RewriteCond %{REQUEST_URI} !^.*/do/.+$ -#RewriteRule ^.*$ do/index [R,L] - -#RewriteCond do/%{REQUEST_FILENAME}.php -f -#RewriteRule ^do/(.+)$ $1.php [L] - -#RewriteCond %{THE_REQUEST} !^(GET|HEAD)\ /.+\.php\ HTTP -#RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /.+mitsql/do/.+\ HTTP - -## REVISION 4 RewriteCond %{REQUEST_URI} ^.*/do/(.+)$ -RewriteRule ^do/(.+)$ $1.php [QSA] +RewriteRule ^do/(.+)$ $1.php [L,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* do/index [R,L,QSA] -# now redundant after following conditions -#RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /.+\.php\ HTTP -#RewriteRule .* do/index [R,L,QSA] - RewriteCond %{THE_REQUEST} !^(GET|POST)\ /.+do/.+\ HTTP RewriteCond %{REQUEST_FILENAME} !\.html$ RewriteCond %{REQUEST_FILENAME} !\.css$ diff --git a/.htaccess.main b/.htaccess.main index cddad44..bcb65c2 100755 --- a/.htaccess.main +++ b/.htaccess.main @@ -1,58 +1,5 @@ -#php_value auto_append_file "global.done.php" -#php_value auto_prepend_file "prepend.php" -#php_flag xdebug.remote_enable on -#php_flag xdebug.remote_autostart on -#php_value xdebug.remote_host "localhost" -#php_value xdebug.remote_port "9000" - RewriteEngine On RewriteBase /~sql/main/ -#RewriteBase http://sql.mit.edu/ -#RewriteBase / - -#RewriteOptions MaxRedirects=1 - -#RewriteCond %{REQUEST_FILENAME}.php -f -#RewriteRule ^.* do/%{REQUEST_FILENAME} -#RewriteCond %{REQUEST_URI} !^/~administrator/mitsql/go/.+ - -##RewriteCond %{REQUEST_URI} -##RewriteCond %{REQUEST_FILENAME} !-s -#RewriteRule ^do/.+$ - [L] - -#RewriteCond %{IS_SUBREQ} !="true" -#RewriteRule ^.*$ do/index [R,L] - -##RewriteCond %{REQUEST_URI} ^.*/do/.+$ -##RewriteRule ^do/.+$ - [C] -#RewriteRule ^do/(.+)$ $1.php [PT,L] - -#RewriteRule ^do/(.+)$ $1.php [L] - -## attempt 2 -#RewriteCond %{REQUEST_URI} !^.*/do/.+$ -#RewriteRule ^.*$ do/index [R,L] -# -#RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /.+\.php\ HTTP -#RewriteRule \.php$ - [F] -# -##RewriteCond do/%{REQUEST_FILENAME}.php -f -#RewriteRule ^do/(.+)$ $1.php [L] - -# attempt 3 - -#RewriteRule \.php$ - [F,C] - -#RewriteCond %{REQUEST_URI} !^.*/do/.+$ -#RewriteRule ^.*$ do/index [R,L] - -#RewriteCond do/%{REQUEST_FILENAME}.php -f -#RewriteRule ^do/(.+)$ $1.php [L] - -#RewriteCond %{THE_REQUEST} !^(GET|HEAD)\ /.+\.php\ HTTP -#RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /.+mitsql/do/.+\ HTTP - -## REVISION 4 RewriteCond %{REQUEST_URI} ^.*/do/(.+)$ RewriteRule ^do/(.+)$ $1.php [L,QSA] @@ -60,10 +7,6 @@ RewriteRule ^do/(.+)$ $1.php [L,QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule .* do/index [R,L,QSA] -# now redundant after following conditions -#RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /.+\.php\ HTTP -#RewriteRule .* do/index [R,L,QSA] - RewriteCond %{THE_REQUEST} !^(GET|POST)\ /.+do/.+\ HTTP RewriteCond %{REQUEST_FILENAME} !\.html$ RewriteCond %{REQUEST_FILENAME} !\.css$ diff --git a/test.php b/test.php index af8af57..2c6210a 100755 --- a/test.php +++ b/test.php @@ -35,7 +35,7 @@ echo $l->isValid(); print_r($GLOBALS); */ -phpinfo(); +//phpinfo(); //checkQuotas();