Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle short (Pretty) URL formats #17

Open
m1ari opened this issue Jun 18, 2018 · 0 comments
Open

Handle short (Pretty) URL formats #17

m1ari opened this issue Jun 18, 2018 · 0 comments

Comments

@m1ari
Copy link

m1ari commented Jun 18, 2018

Some wikis are setup using the ShortURLS format where actions (e.g. &action=edit) can be handled via a pretty url(e.g https://wiki.site/edit/Page_Name). It seems like for wikis using this format this extension cannot create pretty URLs (whilst the traditional urls might work it defeats the purpose of having pretty urls).

This setup makes use of the re-write functionality in the webserver e.g.

RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
RewriteRule ^/(edit)/(.*)$ %{DOCUMENT_ROOT}/w/index.php [L,QSA]
RewriteRule ^/(history)/(.*)$ %{DOCUMENT_ROOT}/w/index.php [L,QSA]

the wgActionPaths config option within media wiki e.g.

# Setup pretty paths or view/edit/history
$wgActionPaths['edit'] = "/edit/$1";
$wgActionPaths['history'] = "/history/$1";
$wgArticlePath = "/wiki/$1";

This allows for the following urls

Other actions may still use the ?action= like: https://wiki.evergreencoin.org/w/index.php?title=Main_Page&action=watch

It might be good if the extension could allow for such a configuration, maybe by looking to see if the relevant $wgActionPaths config options are set (the default article path should be in $wgActionPaths['view']

lens0021 added a commit to lens0021/DiscordNotifications that referenced this issue May 27, 2021
* Use AbuseFilterShouldFilterAction hook for Flow actions (kulttuuri#16)

* Use AbuseFilter hook for Flow actions

* build: Add AbuseFileter as a dependency

* Add a type check for UUID

* Do not ruin Flow\Tests\Api\Api*Test

(cherry picked from commit da9123b)

* Remove links syntax from Flow topic titles

(cherry picked from commit 7892b54)

* Reflect breaking changes of AbuseFilter for MW1.36

* Cleanup phpcs errors

* Fix Phan errors

* Fix failed phpcs tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants