I have a directory named gplus
within /var/www
path. And my configuration file , ie guwahatiplus.com.conf
is as below
<VirtualHost *:80>
ServerAdmin nitish@guwahatiplus.com
ServerName guwahatiplus.com
ServerAlias www.guwahatiplus.com
DocumentRoot /var/www/gplus/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/gplus>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
My mod_rewrite is On. And the .htaccess
file is
RewriteEngine On
Options +MultiViews
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [R=301,L]
Now if I go to url http://www.guwahatiplus.com/gplustest.php, its displaying , but http://www.guwahatiplus.com/gplustest not. Whats wrong.
NB : I have hosted the files at Digitalocean