.htaccess - Trail slash is causing 404 error and improper url behavior: APACHE/ PHP -
hoping 1 of can help. developing using php, without framework, therefore of routing rules in .htaccess opposed .php so here problem. website http://example.com , navigation pretty straight forward, meaning if click 'press' page link go http://example.com/press or http://example.com/press/ both fine. however, if happen go http://example.com/press/ click internal link in nav, such 'about' etc.. not take '/example' rather '/press/example' shows 404 since there not page or directory handle this. i tried 'directoryslash off' in .htaccess did prevent of these pages showing if url has / @ end. i have 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] rew...