ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

mod rewrite for URLs

August 21, 2009 12:33pm

Subscribe [1]
  • #1 / Aug 21, 2009 12:33pm

    Kevin Evans

    222 posts

    Hello I am using the LG .htaccess Generator (v.1.0.0) on a site where I am using the Pages module to give pages a name with an extension, .html extension to be exact. But I need the pages to not have the trailing slash at the end of .html/. It works with that but when i remove the / in the browser URL it goes to the homepage.

    The rewrite code that LG .htaccess Generator (v.1.0.0)  writes to the .htaccess file seems like it should work but it isn’t.

    It has this rule:

    # Add a trailing slash to paths without an extension
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule ^(.*)$ $1/ [L,R=301]

    But that’s not working

    Any ideas?

    Thanks!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases