search
Log In
Welcome to BlogiesTools Ask, a platform where beginners and professional bloggers come to seek answers from other bloggers’ experiences.

You can register and login to ask or answer a question or do it anonymously without logging in.

You can ask questions related to starting a blog, monetizing a blog, marketing a blog, managing a blog, fixing a problem, best tools to use, etc.

Ask a Question

1 vote
I want my mediawiki URLS to be short and SEO friendly.
in Fixing Blog Problems
edited by

1 Answer

0 votes
 
Best answer

To make your MediaWiki powered website SEO friendly, then follow the two steps provided below. 

Step 1: Add code to htaccess file

  • Go to your website's main folder 
  • Open .htaccess folder 
  • Copy and paste the following code  

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?title=$1 [NC,L,QSA]

 
The code above removes index.php from Mediawiki CMS (Content Management Systems) web page urls, making them short and SEO friendly.  

Step 2: Add code to LocalSettings.php file

  • Go to LocalSettings.php and add the following code

$wgScript = "";

$wgArticlePath = "$wgScript$1"; 

Note: If you have installed MediaWiki in a public html folder for instance forum folder the replace line one of the code $wgScript = "";     with     $wgScript = "/forum/";

 

15.0k points

Related questions

0 votes
1 answer
I want to enable canonical URL in mediawiki so that the original URL is identified
asked Nov 8, 2021 in Fixing Blog Problems anonymous
1 vote
1 answer
I want to remove the powered by MediaWiki icon added at the footer of my MediaWiki website
asked Nov 8, 2021 in Fixing Blog Problems anonymous
1 vote
1 answer
I cannot seem to find a way to disable Yoast SEO schema data
asked Oct 29, 2021 in Fixing Blog Problems anonymous
0 votes
1 answer
I want to check whether my website is mobile-friendly
asked Nov 10, 2021 in Blog Optimization anonymous
1 vote
2 answers
What are the steps of creating and submitting a sitemap to Google Search Console
asked Oct 29, 2021 in General elvis 170 points