In CentOS, a2enmod rewrite results in “command not found” but httpd -M lists rewrite module as listed and shared. I'm trying to enable it so can then have these rewrite rule apply so I can switch back to "clean-urls" on my cms. As it stands my site will only load pages that are /?=page instead of /page.
My changes are in /etc/httpd/conf/httpd.conf.
changed NONE to ALL:
<Directory />
Options FollowSymLinks
AllowOverride ALL
</Directory>
Then added the following after
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/www/html/mycms">
<IfModule rewrite_module>
RewriteEngine on
RewriteBase /mycms
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
</IfModule>
</Directory>
After restart I get :
Starting httpd: httpd: Syntax error on line 354 of /etc/httpd/conf/httpd.conf: </Directory> without matching <Directory> section
[FAILED]




