Topic on User talk:Dantman

Rogerhc (talkcontribs)

Dantman, you saved my bacon with that Short URL conifig generator at https://shorturls.redwerks.org/ (I found it linked to in Manual:Short_URL#External_links). Thank you. For some reason my wiki's short URL config broke when I upgraded from MW1.31.1 to MW1.35.1, but I made a new Short URL config with your generator and it works! Thank you! When I was young I believed in flying carpets. Later I believed in root level Short URLs (and set up teflpedia.com wiki accordingly). Now I rely on heros like you to save my bacon. I am upgrading that wiki in a test area and was stumped on some short URL problem but your tool has my wiki magically levitating again. So I can proceed with my upgrade, tomorrow. Thank you! Visual editor is throwing an error, "Error contacting the Parsoid/RESTBase server (HTTP 404)" -- maybe I will have to disable visual editor, alas. --Rogerhc (talk) 05:11, 27 January 2021 (UTC)

Rogerhc (talkcontribs)

Fixed that for my root level short URL with this added rewrite condition in .htaccess:

RewriteCond %{HTTP_USER_AGENT} !^(VisualEditor)

See https://www.mediawiki.org/w/index.php?title=Topic:Vv35plp6g16qno0s&topic_showPostId=vv4jia2ip0swopod#flow-post-vv4jia2ip0swopod

Here's what the https://shorturls.redwerks.org config I'm using + that^ looks like, and it's working! :)

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} !^(VisualEditor)
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php [L]

RewriteCond %{HTTP_USER_AGENT} !^(VisualEditor)
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2 [L,QSA,B]

RewriteCond %{HTTP_USER_AGENT} !^(VisualEditor)
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^/?images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ %{DOCUMENT_ROOT}/thumb.php?f=$1&width=$2&archived=1 [L,QSA,B]
Rogerhc (talkcontribs)

Dang, that works for http:// but not for https://. When I switch to https:// I get this error when I click the VisualEditor "edit" link on a page:

Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK

I am using a self-signed SSL certificate. Don't know if that is an issue.

Rogerhc (talkcontribs)

Yes, it works on my production wiki!

My production wiki has a properly authorized SSL certificate. Visual Editor is working there!

My test wiki only has a self authorized SSL certificate, and throws the above error when trying to open a page with Visual Editor.

Thanks again for the short URL config tool at https://shorturls.redwerks.org ! Very helpful!

2603:8080:5701:887D:2150:6BB4:FA4E:926B (talkcontribs)

That one single line worked for me with https. I no longer have to choose between short URLs and Visual Editor. Thanks a million.

Reply to "Short URL hero"