Article 4ZVGG Apache ReWrite Rules .HTACCESS FILE

Apache ReWrite Rules .HTACCESS FILE

by
Erudes
from LinuxQuestions.org on (#4ZVGG)
Hey everyone, new to the forum hope I'm posting in the right place.

I have MediaWiki installed on Apache on CentOS7. Everything works fine, but I need to rewrite URLs to make them shorter. Default path is http://mediawiki.my.domain/mediawiki/index.php/article, and I'm just trying to get them like this: http://mediawiki.my.domain/mediawiki/article

I edited LocalSettings.php on MediaWiki path with:

$wgScriptPath = "/mediawiki";
$wgArticlePath = "/mediawiki/$1";

And I also have and .htaccess file on /var/www/html with the following:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^mediawiki/(.*)$ mediawiki/index.php?title=$1 [PT,L,QSA]
RewriteRule ^mediawiki/*$ mediawiki/index.php [L,QSA]
RewriteRule ^mediawiki$ mediawiki/index.php [L,QSA]

So when I type http://mediawiki.my.domain/mediawiki I get a 404 Not Found

The requested URL /mediawiki/Main_Page was not found on this server.

Any ideas on what I'm doing wrong?latest?d=yIl2AUoC8zA latest?i=ic_OUc_8q2U:UpUQZy_dHlg:F7zBnMy latest?i=ic_OUc_8q2U:UpUQZy_dHlg:V_sGLiP latest?d=qj6IDK7rITs latest?i=ic_OUc_8q2U:UpUQZy_dHlg:gIN9vFwic_OUc_8q2U
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments