Topic: How to add a slash at the end of page URLs

Default .htaccess file contain

RewriteBase /montra/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]

It little bit confusing me.

How to add a slash at the end of page URLs.

Ex :

Before : http://localhost/montra/about
After : http://localhost/montra/about/

Re: How to add a slash at the end of page URLs

well you don't really need a end slash for url to work smile

Re: How to add a slash at the end of page URLs

ya. i know. the urls are perfectly worked. but i need / at the url end. because if i change my cms in feature ex: wordpress, it provide / at url end. so how to add / via .htaccess.

Re: How to add a slash at the end of page URLs

As I know, it can be done if the path is a folder. But in this case, it seems that the about path is come from about.php, not from a folder. Out of this topic, for example, simply create an index.php file inside the about folder, then logically would be turned into this:

http://your_site.com/about/index.php → http://your_site.com/about/

Or, try something like this:

RewriteRule ^(.*)/?$ index.php [QSA,L]
RewriteRule http://your_site.com/about http://your_site.com/about/ [R=301]
XSS Testing <script>alert('HIYAA!!!');</script>

tovic's Website