Centos 7, Apache 2.4.6
So, I am trying to short URL like this:
http://mywiki.com/index.php/article
to
http://mywiki.com/wiki/article
[Edit: I changed this from mywiki.com/article to mywiki.com/wiki/article. Sorry, I originally wrote this after doing command line for about 8 hours straight.]
I have mod_rewrite enabled:
grep -i LoadModule /etc/httpd/conf/httpd.conf | grep rewrite
gives
LoadModule rewrite_module modules/mod_rewrite.so
I have a symbolic link called "fts" that points to the root folder of the wiki documents.
I go to my root folder of my wiki documents:
cd /var/www/html/mediawiki-1.24.1 sudo vim .htaccess
and then I create this .htaccess file
## http://www.mediawiki.org/wiki/Manual:Short_URL/Apache # Enable the rewrite engine RewriteEngine On # Short url for wiki pages RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/fts/index.php [L] # Redirect / to Main Page RewriteRule ^/*$ %{DOCUMENT_ROOT}/fts/index.php [L]
Then I load up my wiki and nothing is different. So, I go back to to httpd.conf and make sure AllowOverrides All is on:
grep -i AllowOverride /etc/httpd/conf/httpd.conf
gives
AllowOverride None AllowOverride All <--- this is the <Directory "/var/www/html"> section one AllowOverride None AllowOverride None
What's up here? I can't figure out why nothing is going on. I'm restarting httpd every time I do an edit to anything.