Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1

Yesterday, I just starting using Couch and loving it so far.

I have one question though - how do I ensure that URLs are always displayed without the trailing slash?

For example, I currently get: lagu

But I would like:

This is my about page htaccess code:

RewriteRule ^about$ "$0/" [R=301,L,QSA]
RewriteRule ^about/$ about.php [L,QSA]
RewriteRule ^about/.*?([^\.\/]*)\.html$ about.php?pname=$1 [L,QSA]
RewriteRule ^about/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ about.php?d=$1$2$3 [L,QSA]
RewriteRule ^about/[^\.]*?([^/\.]*)/$ about.php?fname=$1 [L,QSA]
RewriteRule ^about/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

Thanks in advance,

Just below the
Code: Select all
RewriteEngine On

you can do the following:
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-d
# for testing
RewriteRule ^(.*)/$ /$1 [L,R]

For Production use the code as:
Code: Select all
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

This should help you implement the "No Trailing Slash" policy.

where innovation meets technology
2 posts Page 1 of 1