gandalf458
IS-IT--Management
I have a website with SEO-friendly URLs (for example, contact-us rather than contact-us.php)
I have the following commands in my .htaccess file which directs all the pages correctly.
I would also like, if possible, to direct visitors to the correct page if they inadvertently add a trailing slash.
Can it be done? I'm a numpty with regex.
I have the following commands in my .htaccess file which directs all the pages correctly.
Code:
RewriteEngine on
RewriteRule ^([-A-Za-z0-9]+)$ $1.php [PT,L]
I would also like, if possible, to direct visitors to the correct page if they inadvertently add a trailing slash.
Can it be done? I'm a numpty with regex.