I have several static html pages which I'm importing to CMS MS. Most of those pages are not index pages of directories, but just normal pages with .html file extension. I want to avoid breaking any links and keep my search engine ranks, so I'd like to know how to create pages which have .html ending in the URL. I'm using pretty URLs.
.htaccess tricks are also welcome. All the static pages are in separate directory, so if there is a way to redirect all queries to http://domain.example/foo/*.html to http://domain.example/foo/*/ that would be fine too.
[solved] Adding .html to page alias
[solved] Adding .html to page alias
Last edited by artturi on Wed Aug 19, 2009 3:49 pm, edited 1 time in total.
Re: Adding .html to page alias
Search and documentation are your friends.
The setting to append .html is in config.php
The subject of keeping SEO ratings has been discussed on the forum. search for it.
.htaccess is described well in the documentation section of this website.
The setting to append .html is in config.php
The subject of keeping SEO ratings has been discussed on the forum. search for it.
.htaccess is described well in the documentation section of this website.
Re: Adding .html to page alias
http://wiki.cmsmadesimple.org/index.php ... ty_URL.27s describes how to add file extension to all pages, but I'd like to add that to only specific pages. So far that is the closes thing I've managed to find.
Re: Adding .html to page alias
Good! What you are looking for is a 301 .htaccess redirect. Here is an example from mine site:
You see how someone requesting the .html file will actually be served a page generated from "?page="
Code: Select all
redirect 301 /Firefox_downloading_MKRD_IP.html http://mkrd.info/?page=2-files-limit-fix
redirect 301 /firefox_downloading.html http://mkrd.info/?page=2-files-limit-fix
redirect 301 /funny/funny_stuff.html http://mkrd.info/?page=funny-stuff
redirect 301 /software/firefox/firefox_download_manager_2_files_limit_fix.html http://mkrd.info/?page=2-files-limit-fix
redirect 301 /software-discussions/cms-made-simple/quotes-in-cmsms-links.html http://mkrd.info/?page=cmsms-and-modules-bugs-and-problems
Re: [solved] Adding .html to page alias
Thanks, this works perfectly.