简体   繁体   中英

Apache2 rewriting without rules

So i've a Wordpress site on my domain and i want to add subdomains with their own php code. I'm using mod_rewrite for wordpress and want to use it for my own projects but weirdly i can access urls that should result in a 404 error. For example i can access test/somestuff/morestuff and get test.php (without any $_GET set). But i have no .htaccess file in the directories for the virtual hosts. I then tried to delete the .htaccess from wordpress, restart apache2, and try again but i get the same behavior on the virtual host and wordpress doesn't work with permalinks (like i thought it would). My sites-available configs don't have any rewrite rules in them. Why can i access URLs that shouldn't work? Am i missing some feature of apache?

So after some more trying i've discovered the error was that i've had MultiViews enabled for the virtual host. I've disabled it and now it works.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM