RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ /rest.php?%{QUERY_STRING} [L]
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule /de/rest.php/ /de/rest.php?%{QUERY_STRING} [L]
RewriteRule /en/rest.php/ /en/rest.php?%{QUERY_STRING} [L]
RewriteRule /ru/rest.php/ /ru/rest.php?%{QUERY_STRING} [L]
RewriteRule rest.php/ /rest.php?%{QUERY_STRING} [L]
Interesting. I'm noticing that the rule asks NGinx to match the directory rest.php, but how could it be a directory? Maybe that's the bug they're trying to fix.
Code:RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule /de/rest.php/ /de/rest.php?%{QUERY_STRING} [L] RewriteRule /en/rest.php/ /en/rest.php?%{QUERY_STRING} [L] RewriteRule /ru/rest.php/ /ru/rest.php?%{QUERY_STRING} [L] RewriteRule rest.php/ /rest.php?%{QUERY_STRING} [L]
This more closely follows the whole bug fix as you linked.
As I read it, the second link doesn't apply to this block, but you can add the bold text after RewriteEngine On
RewriteCond %{REQUEST_URI} !^(static)
RewriteCond %{HTTP_USER_AGENT} !^(VisualEditor)
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/wiki/index.php [L]
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule rest.php/ /rest.php?%{QUERY_STRING} [L]
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php
RewriteRule rest.php/ /rest.php?%{QUERY_STRING} [L]
ive never tried running anything rest with apache,
but then ive never used 2 rewrite rules like that either.
if you use the code from garrettroyce what happens,
you get the 403 ? 403 is a forbidden error i believe.
(guessing without looking it up)
also note, i saw that someone posted this,
"not able to edit the nginx or Apache base configuration."
Im not sure if this would be the same issue you'd have.
RewriteCond %{REQUEST_URI} !^(static)
RewriteCond %{HTTP_USER_AGENT} !^(VisualEditor)
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php
RewriteRule rest.php/ /rest.php?%{QUERY_STRING} [L]
its just me but id be cautious of code suggested offsite.
(code provided on forums other than x10 hosting)
i say that because ive noticed some posters operating environments,
at that link you showed, which is not the same as x10
and may result in different results.
just saying.
but if @garrettroyce 's code resolves the 404 as you said,
use it then just troubleshoot the 403.
#1
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule rest.php/ /rest.php?%{QUERY_STRING} [L]
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]
#2
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule rest.php/ /rest.php?%{QUERY_STRING} [L]
RewriteRule ^ index.php?%{QUERY_STRING} [L]
RewriteCond %{REQUEST_URI} !^(static)
RewriteCond %{HTTP_USER_AGENT} !^(VisualEditor)
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/wiki/index.php [L]
162.158.156.190 - - [08/Oct/2020:15:18:06 -0400] "GET /Main_Page HTTP/1.1" 200 8475 "https://[domain]/Main_Page?action=edit&veswitched=1" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228 (Edition avira-2)"
162.158.156.190 - - [08/Oct/2020:15:18:09 -0400] "GET /load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=timeless&version=7khli HTTP/1.1" 304 433 "https://[domain]/Main_Page?veaction=edit" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228 (Edition avira-2)"
162.158.156.190 - - [08/Oct/2020:15:18:09 -0400] "GET /load.php?lang=en&modules=ext.visualEditor.core&skin=timeless&version=1sypu HTTP/1.1" 304 433 "https://[domain]/Main_Page?veaction=edit" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228 (Edition avira-2)"
162.158.73.250 - - [08/Oct/2020:15:18:11 -0400] "GET /rest.php/[domain]/v3/page/html/Main_Page/95?redirect=false&stash=true HTTP/1.1" 403 455 "-" "VisualEditor-MediaWiki/1.35.0"
162.158.156.190 - - [08/Oct/2020:15:18:09 -0400] "GET /api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en&formatversion=2 HTTP/1.1" 200 931 "https://[domain]/Main_Page?veaction=edit" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228 (Edition avira-2)"
162.158.156.190 - - [08/Oct/2020:15:18:11 -0400] "POST /api.php HTTP/1.1" 200 885 "https://[domain]/Main_Page?veaction=edit" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 OPR/71.0.3770.228 (Edition avira-2)"
GET /Main_Page
200 - OK
GET /load.php?lang=en&modules=oojs-ui-core%2Coojs-ui-widgets&skin=timeless&version=7khli
304 - NOT MODIFIED
GET /load.php?lang=en&modules=ext.visualEditor.core&skin=timeless&version=1sypu
304 - NOT MODIFIED
GET /rest.php/[domain]/v3/page/html/Main_Page/95?redirect=false&stash=true
403 - FORBIDDEN
GET /api.php?action=visualeditor&format=json&paction=parse&page=Main_Page&uselang=en&formatversion=2
200 - OK
POST /api.php
200 - OK
RewriteRule ^/rest.php/(.*)$ /rest.php?SOMETHING=$1&%{QUERY_STRING}
RewriteRule ^/rest.php/(.*)$ /rest.php?$1&%{QUERY_STRING}