This question may be duplicated but I search a lot and can't find an answer. So I'm using htaccess file to Rewrite and I want to show the same page using URLs : http://localhost/assoc/about and http://localhost/assoc/about/ .
I call page contents by " include_once " and pages are located in directory /www/assoc/astc/ . When I tape for example http://localhost/assoc/about it works but with the training slash, it redirects to 404 page.
Here is my htaccess. Thanks.
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(?:css|js|jpe?g|gif|png)$ [NC]
RewriteRule ([a-z]+)$ astc/accueil.php?page=$1 [L]
RewriteRule ^/(.*)$ astc/accueil.php?page=$1 [R=301,L]
RewriteRule ([a-z]+)/([A-Za-z0-9_]+)$ astc/accueil.php?page=$1&id=$2 [L]
RewriteRule ^/(.*)$ astc/accueil.php?page=$1&id=$2 [R=301,L]
ErrorDocument 404 http://localhost/assoc/page-non-trouvee