Link to pages on site without .html extension appearing in browser?

Posted by Anime163 on Pro Webmasters See other posts from Pro Webmasters or by Anime163
Published on 2012-07-06T13:37:01Z Indexed on 2012/07/06 15:23 UTC
Read the original article Hit count: 181

Filed under:
|
|
|

I've modified my .htaccess file to allow access to html files without having to include the extension on the end, for example:

www.mysite.com/document

directs to

www.mysite.com/document.html

However, when I want to link to pages within my site using something like <a href="page.html"></a> I still get the .html appearing in the URL.

So am I allowed to exclude the extension and leave a link as <a href="page"></a> so that the extension doesn't appear in the browser? Or is there a better way to do it?

© Pro Webmasters or respective owner

Related posts about htaccess

Related posts about redirects