Here is my .htaccess file
Options +FollowSymlinks RewriteEngine on ErrorDocument 404 /404.php RewriteRule ^(\d*)/(.*) /page.php?id=$1&slug=$2
Everything works perfectly. But the moment I type site.com/342/my-page/(with the trailing slash), I get 404.
I need a trailing slash as optional. I. It will redirect to the correct page with or without a slash.
I tried this but it did not work
RewriteRule ^(\d*)/(.*)/?$ /page.php?id=$1&slug=$2
Any ideas?
source share