We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 6723
    • 93 Posts
    I've finally upgraded my site from Evo to Rev 2.2.4 and all going well so far.

    However, on previous site all files had the file ext .htm and now Rev puts them in .html

    I've tried two methods;

    first - in Rev manager in /system/content types - changed extension there, cleared cache etc and the pages don't work either with .htm or .html !!!!

    second - in htaccess i've added a line;

    RewriteRule ^(.*)\.htm$ $1.html [R=permanent]

    so my htaccess looks like this;

    # Friendly URLs Part
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*)\.htm$ $1.html [R=permanent]
    RewriteCond %{HTTP_HOST} .
    # Force all pages to go to www.domain.com for SEO
    RewriteCond %{HTTP_HOST} !^www\.djcdesign\.co.uk [NC]
    RewriteRule (.*) http://www.djcdesign.co.uk/$1 [R=301,L]
    # Friendly URLs
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    # Additional Settings Follow
    ExpiresActive On
    ExpiresByType image/gif A2592000
    ExpiresByType image/jpeg A2592000
    ExpiresByType image/png A2592000
    BrowserMatch "MSIE" brokenvary=1
    BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
    BrowserMatch "Opera" !brokenvary
    SetEnvIf brokenvary 1 force-no-vary

    But doesn't seem to do anything - .htm files still cause an error

    Any ideas - as i guess my SEO is going to be effected big time !

    Thanks, David
      • 39932
      • 483 Posts
      On my host, I had to change:

      RewriteRule ^(.*)\.htm$ $1.html [R=permanent]

      to:

      RewriteRule ^(.*).htm$ $1.html [R=permanent]

      For some reason, the \. was not registering correctly (although this is standard)
        Website: Extended Dialog Development Blog: on Extended Dialog
        Add-ons: AJAX Revolution, RO.IDEs Editor & Framework (in works) Utilities: Plugin Compatibility List
        Tutorials: Create Cross-Context Resources, Cross-Context AJAX Login, Template-Based Actions, Remove Extensions from URLs

        Failure is just another word for saying you didn't want to try. "It can't be done" means "I don't know how".