This question already has an answer here:
I am displaying my dynamic web pages from database using page.php file.
I'm using following htaccess rule to make user-friendly urls:
RewriteRule ^(.*)$ page.php?url=$1 [QSA,L]
So that the URL http://blog.com/page.php?url=sample
becomes http://blog.com/sample
But when the forward slash (http://blog.com/sample/
) is appended to the url, the website can not find the page.
What changes need to be done in my .htaccess file?
Though I can trim (/
) in my page.php but I want to have such rule in htaccess which can handle pages w/wo slashes.
EDIT
But I have dynamic pages from database and I want to modify my existing htaccess regular expression
</div>