Hide index php: Difference between revisions

No edit summary
No edit summary
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="max-width:70em; margin:auto;">'''STEP 1:''' Add the following code to .htaccess file:
'''STEP 1:''' Add the following code to .htaccess file:
  RewriteEngine On
  RewriteEngine On
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
  RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
Line 10: Line 10:


'''STEP 2:''' Now add the following code in LocalSettings.php
'''STEP 2:''' Now add the following code in LocalSettings.php
  $wgScriptPath      = “/<span style="color:#ff0000">MW-DIRECTORY</span>“;
  $wgScriptPath      = “/<span style="color:#ff0000">MW-DIRECTORY</span>“;
  $wgScriptExtension  = “.php”;
  $wgScriptExtension  = “.php”;
Line 17: Line 18:
Replace <code><span style="color:#ff0000">MW-DIRECTORY</span></code> with the MediaWiki installation directory. Your <code>LocalSettings.php</code> file might already contain the first two lines of the code given above. If these lines are already present –just add the second and third line right below the existing lines.
Replace <code><span style="color:#ff0000">MW-DIRECTORY</span></code> with the MediaWiki installation directory. Your <code>LocalSettings.php</code> file might already contain the first two lines of the code given above. If these lines are already present –just add the second and third line right below the existing lines.


==Referensi==
==Source==
*[https://bit.ly/3zzRBsU Generator]
*[https://shorturls.redwerks.org/ Generator]
*[https://techwelkin.com/mediawiki-urls-short-clean-and-beautiful techwelkindotcom]
*[https://techwelkin.com/mediawiki-urls-short-clean-and-beautiful techwelkin.com]


[[Category:Tutorial]]
[[Category:Tutorial]]
</div>
[[Category:MediaWiki]]