Search code examples
phpapache.htaccessdrupaldrupal-7

Drupal still working without .htaccess file


I'm having a weird problem with my site.

Recently I found that one domain (not mine) was pointing to my IP. My IP hosts a system on Drupal 7 (LAMP) and Ubuntu. My site (still in development and only working in my IP) was already indexed by Google with that other domain name, so I decided to block this site with a simple ".htaccess" trick...

I can't block the "intruder" site using this and that snippet... Frustrated after many tries I wrote some garbage to see if something happened... but everything was still working. Then I erase the .htaccess file in Drupal root... but everything is still working until now.

I've been developing almost 10 years ago, managing small VPSs a few years ago, and when you make a tiny mistake in .htaccess then nothing works! And that's ok! So, as you can imagine i'm lost.

Here is the result when I search for all .htaccess files: enter image description here

My Drupal is installed in /var/www/html

Using the devel module this is part of my phpinfo (as you can see .htaccess is not in Drupal root):

enter image description here

Possibly, I'm making a very stupid mistake, but i've been on this like 2 hours and right now I don't have more places to look at.

I restarted Apache, asumming some kind of unknown cache in the .htaccess file. I also restarted the VPS (Digital Ocean)... No .htaccess file, but my Drupal installation is still working...

I'm missing something terribly... please help!

UPDATE: Every page is still working... also nice URLs. UPDATE 2: I'm attaching how looks 'sites-enabled' folder from Apache with only one file and it's contents.

sites-enabled folder and 000-default.conf contents


Solution

  • Most likely you have some rewrite rules in your VirtualHost configuration and/or apache configuration files. Check all files in /etc/apache2/sites-enabled for any RewriteRules.