Hoping one of you can help. I am developing using php, without a framework, therefore all of my routing rules are in .htaccess as opposed to .php
So here is my problem. Say my website is http://example.com and my navigation is pretty straight forward, meaning if you click the 'press' page link you will go to http://example.com/press or http://example.com/press/ which are both fine.
However, if you do happen to go to http://example.com/press/ click another internal link in my nav, such as 'about' etc.. I will not take you to '/example' but rather '/press/example' which shows a 404 since there is not page or directory to handle this.
I tried 'DirectorySlash Off' in my .htaccess but all that did was prevent any of these pages from showing if a url has / at the end.
I have a very basic .htaccess setup, See below:
<IfModule mod_rewrite.c>
RewriteEngine On
# Options -Indexes
# GEN CONFIG
# Handle Errors
ErrorDocument 403 /views/errors/404.php
ErrorDocument 404 /views/errors/404.php
ErrorDocument 303 /views/errors/404.php
# Url renamin
RewriteRule ^(about-us|About-Us|ABOUT-US)/?$ views/about-us.php [L]
RewriteRule ^(press|Press|PRESS)/?$ views/press.php [L]
RewriteRule ^(faq|Faq|FAQ)/?$ views/faq.php [L]
</IfModule>