From 592afdba4f53f6bdc0836483076f3e1c560815a2 Mon Sep 17 00:00:00 2001 From: Ruan <2369127-ruany@users.noreply.gitlab.com> Date: Tue, 8 Sep 2020 02:56:25 +0000 Subject: [PATCH] Update Simple URLs --- Simple-URLs.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Simple-URLs.md b/Simple-URLs.md index 76916df..9788d25 100644 --- a/Simple-URLs.md +++ b/Simple-URLs.md @@ -13,16 +13,17 @@ In nginx.conf: Note: Untested -1) Enable `simple_urls` in `settings.php` +1) Create a file named `.htaccess` in the same folder as `index.php` -2) Create a file named `.htaccess` in the same folder as `index.php` - -3) Paste this into `.htaccess`: +2) Paste this into `.htaccess`: ``` -Options -MultiViews RewriteEngine On -RewriteCond %{REQUEST_FILENAME} !-f -RewriteRule ^ index.php [QSA,L] +RewriteCond %{REQUEST_FILENAME} -f [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^.*$ - [NC,L] +RewriteRule ^(inc) - [NC,L] +RewriteRule ^.*$ index.php [NC,L] ``` -4) Visit `/bans/` (e.g. "example.com/punishments/bans/") and check if it works as expected. \ No newline at end of file +3) Visit `/bans/` (e.g. "example.com/punishments/bans/") and check if it works as expected. \ No newline at end of file