Menu Content

Support

> Forums, FAQs & Paid Support
Welcome, Guest
Username Password: Remember me

Be tolerant to trailing slash? Not working
(1 viewing) (1) Guest
Support forum for users using free edition of JoomSEF 3 (Joomla 1.5 compatible). These forums are mainly for mutual help between users.

Please note that due to our capacity limitations, we do not monitor these forums regularly.
  • Page:
  • 1

TOPIC: Be tolerant to trailing slash? Not working

Be tolerant to trailing slash? Not working 17 years, 2 months ago #3063

JoomSEF 2.1.1 and Joomla 1.0.13
Be tolerant to trailing slash functionality is not working no mater what I will choose in configuration. If I have redirection in database without slash then typing it with slash on the end is not working. It's not working both ways.

Re:Be tolerant to trailing slash? Not working 17 years, 2 months ago #3068

This question appears in various forms a number of times in this forum (search \"trailing slash\"). It hasn't been answered satisfactorily, nor even acknowledged by ARTIO.

I believe it arises only when JoomSEF's \"file suffix\" setting has been made blank. In this case, it is fixed by setting file suffix to / (slash). Then all urls will have a slash at the end and none will be filenames.

Then we have the problem of missing trailing slashes -- if someone types in a url without a trailing slash, we want the page to come up, not a 404. Let's modify .htaccess:

Options +FollowSymLinks
DirectoryIndex index.php
RewriteEngine On
RewriteBase /Joomla

RewriteCond %{REQUEST_URI} !(\.|/$)
RewriteRule (.+) /Joomla/$1/ [R=301,L]

RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR]
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php


This is the .htaccess that JoomSEF generated at installation, with RewriteBase modified for the subfolder my site is in (\"/Joomla\"). I've added the two lines isolated in the middle; they force a trailing slash on any url that doesn't contain a dot (ie, a filename) and doesn't end in a slash. After that the JoomSEF rewrites are handled. (I hope a rewriterule expert will polish this up. It works for me.)

So the question remains: What is \&quot;tolerant to trailing slashes\&quot; supposed to do?<br><br>Post edited by: kirk837, at: 2007/09/10 03:35

Re:Be tolerant to trailing slash? Not working 17 years, 2 months ago #3069

In JoomSEF 1.5.1 when I had suffix set to \&quot;/\&quot; it was generating all urls with slash on the end. With Be tolerant to trailing slash On, urls with and without slash on the end where good. With this option set to Off typing urls without slash on the end caused the 404 page to come up. It means that there is a problem with the new version 2.x of JoomSEF or maybe somebode can tell me what Be tolerant to trailing slash really should do?

Thank you for your answer Kim

Re:Be tolerant to trailing slash? Not working 17 years, 1 month ago #3184

  • miro
  • OFFLINE
  • Posts: 1
I really wonder, why there isn't such a feature (and what \&quot;be tolerant to traling slash\&quot; means).

Your tips don't seem to work for me, so I'm currently thinking about switching back to OpenSEF - I'm sorry, but it a SEO .od doesn't provide such a feature, the mod is quite useless - half of my users are getting 404 pages.
  • Page:
  • 1
User Login Empty