Why my htacess is not working as another server

December 4, 2017 255 views
Apache Ubuntu 16.04

This is my demo website link as below.


my htacess code is as per below

Options +MultiViews

RewriteCond %{REQUESTFILENAME} !-d
RewriteCond %{REQUEST
RewriteRule ^([^.]+)$ $1.aspx [NC,L]

ErrorDocument 404 /404.php

Why htacess is not working in digital ocean like my demo website.

is not working when I try to open like this url : http://my-hosting-ip/job-search/

url is going back to index.php or 404.php

Please someone help to solve this problem.

2 Answers
Elizine December 5, 2017
Accepted Answer

Set up the mass virtual with:

VirtualDocumentRoot /var/www/html/%0

But didn't allow override for the parent directory.

<Directory "/var/www/html">
        AllowOverride ALL
VirtualDocumentRoot /var/www/html/%0
Have another answer? Share your knowledge.