Remove Apache "/" at the end of the URL?
Hey, I have a file with 'notes.php' and a folder 'notes' in the web folder, I would like apache to prefer the php file.
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]
Currently I use this to remove .php at the end
This is called “Failure by Design”. If /notes and /notes/ different content ads, you should reconsider your URL Schema.
is not a page I have programmed and work normal white with nginx, there it works without problem
It is not about whether something works, but about whether it is sensible to give /notes and /notes/ different content is not sensible.
But if it’s not from you, you probably can’t change it either. Since I’ve been working with nginx for a long time, I’m not the expert with Apache. Note, however, that a .htaccess can be found in each directory, which can overwrite information from “top”. So if there is a .htaccess in /notes/ for example, the /.htaccess can overwrite. Is at least a not so rare problem if changes do not intervene.
Try to see if it’s possible if you get the line
environment.
Did not work
Why don’t you call the notes.php index.php and put it in the Notes folder? Has exactly the effect and you save the htaccess