diff --git a/fp-plugins/prettyurls/htaccess-new b/fp-plugins/prettyurls/htaccess-new deleted file mode 100644 index 475aa5ce9..000000000 --- a/fp-plugins/prettyurls/htaccess-new +++ /dev/null @@ -1,17 +0,0 @@ -Options -Indexes - - -RewriteEngine On -RewriteBase /~nowhereman/flatpress/branch/flatpress/ - - -RewriteCond %{REQUEST_FILENAME} !-f -RewriteCond %{REQUEST_FILENAME} !-d - - -RewriteRule ^([a-zA-Z0-9_-]+)/$ ./static.php?page=$1 [L] -RewriteRule ^.+/comments/$ ./comments.php [L] - -RewriteRule ^(.+)/$ blog.php [L] - - diff --git a/fp-plugins/prettyurls/htaccess.txt b/fp-plugins/prettyurls/htaccess.txt deleted file mode 100644 index 437d497e9..000000000 --- a/fp-plugins/prettyurls/htaccess.txt +++ /dev/null @@ -1,16 +0,0 @@ -AddType application/x-httpd-php .php .htm .html -Options -Indexes - - - RewriteEngine On - RewriteBase /your_subdirectory/ - - RewriteRule ^\.htaccess$ - [F] - - RewriteRule ^sitemap\.xml$ /your_subdirectory/sitemap.php [L] - RewriteRule ^sitemap$ /your_subdirectory/sitemap.php [L] - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule . /your_subdirectory/index.php [L] - \ No newline at end of file diff --git a/fp-plugins/prettyurls/regression-tests/test-host.php b/fp-plugins/prettyurls/regression-tests/test-host.php new file mode 100644 index 000000000..213af6714 --- /dev/null +++ b/fp-plugins/prettyurls/regression-tests/test-host.php @@ -0,0 +1,40 @@ +') . PHP_EOL; +} + +echo 'HTTP_VIA present = ' . (isset($_SERVER['HTTP_VIA']) ? 'yes' : 'no') . PHP_EOL; + +echo 'HTTP_X_FORWARDED_FOR present = ' . (isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? 'yes' : 'no') . PHP_EOL; + +$keys = [ + 'REQUEST_URI', + 'SCRIPT_NAME', + 'PHP_SELF', + 'PATH_INFO', + 'ORIG_PATH_INFO', + 'REDIRECT_URL', + 'REDIRECT_STATUS', + 'SERVER_SOFTWARE', + 'DOCUMENT_ROOT', + 'REMOTE_ADDR' +]; + +foreach ($keys as $key) { + echo $key . ' = ' . ($_SERVER[$key] ?? '') . PHP_EOL; +} +?>