Not signed in ( Sign In)


Welcome, Guest

Want to take part in these discussions? Sign in if you have an account, or apply for one below

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentTimeAug 10th 2010 edited
    Hi all,

    I need to force the bar "/" at the end of the url : duplicate page
    Example: =
    or: =

    Any solution to this? ...
    thank you very much.
    The example is a Web page that read and use inspiration

    EDIT: here any plugin WP... or
    htaccess rules:
    Options +Indexes
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^myblog\.com
    RewriteRule ^(.*)$$1 [R=permanent,L]

    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$$1/ [L,R=301]
    Work in FP?... thanks again.
    • CommentTimeAug 10th 2010
    I guess it should work
    • CommentTimeAug 10th 2010 edited
    Hi NoWhereMan, can you give an example of how to adapt to flatpress:
    I tried some rules htaccess and did not work.
    # If no slash at the end, put a - no work!
    RewriteCond %{REQUEST_URI} !(\.[^/]*|/)$
    RewriteRule ^(.*[^/])$ /$1/ [R=301,L]
    # Eliminates multiple slash, and put one - work!
    RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)/{2,}\ HTTP/
    RewriteRule ^(.*)$ /%1/ [R=301,L]
    Thank you very much.
    • CommentTimeAug 13th 2010 edited
    Hi...this code, slash forces at end of url.
    For the moment does not work with static pages...
    working: test any expert to work with static pages... please.

    $queryString = $_SERVER['QUERY_STRING'];
    $requestUri = $_SERVER['REQUEST_URI'];
    $uriArr = explode('#', $requestUri);
    $requestUriFragment = $uriArr[1];
    $requestUriBase = $uriArr[0];
    $uriArr = explode('?', $requestUriBase);
    $requestUriBase = $uriArr[0];
    if ( substr($requestUriBase, strlen($requestUriBase) -1, 1) != '/' ) {
    $canonicaIUrl = 'http://'.$_SERVER['SERVER_NAME'];
    $canonicalUrl .= $requesIUriBase .'/';
    @header('HTTP/1.1 301 Moved Permanently', TRUE, 301);