Mobile app version of vmapp.org
Login or Join
Sarah324

: Apache 2.4, trying to turn off DirectorySlash My dev server (Debian 8.5) has DirectorySlash Off in the conf file for a site, and it works - no trailing slash added, and no redirect on requests

@Sarah324

Posted in: #Apache2 #Virtualhost

My dev server (Debian 8.5) has DirectorySlash Off in the conf file for a site, and it works - no trailing slash added, and no redirect on requests for an existing directory.

The same directive is in the conf file for the same site on the test server (Ubuntu 16.04) but it has no effect - Apache keeps stubbornly adding the slash and redirecting.

/etc/apache2/sites-available/site1.conf looks like this on both servers:

<VirtualHost *:8080>
# ...
ServerAdmin webmaster@localhost
DocumentRoot /srv/www/site1
DirectorySlash Off


How can I stop the redirect?

Edit:
OOps it was silly, had to clear cache per w3dk (who's helped me 2x today :) Solved.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Sarah324

1 Comments

Sorted by latest first Latest Oldest Best

 

@Ann8826881

Make sure your browser cache is cleared. DirectorySlash (mod_dir) adds the slash with a 301 redirect, so these will have been cached (hard) by the browser.

Incidentally, you can check where the slash is being added (browser cache or Apache) by checking the network traffic in the browser.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme