FileExtension

Topics: Controls
Sep 10, 2007 at 9:49 PM
There is a problem with FileExtension. I did change it in web.config from ".aspx" to ".html". All links still points to ".aspx" and errors out. If I change the extension manually on the url address it works.
Coordinator
Sep 10, 2007 at 11:19 PM
What links still point to .aspx?
Sep 11, 2007 at 7:15 PM
all links... like Welcome-to-BlogEngineNET.aspx it should be Welcome-to-BlogEngineNET.html since I did change the FileExtension. Right?

<appSettings>
<add key="FileExtension" value=".html"/>
</appSettings>

Coordinator
Sep 11, 2007 at 8:12 PM
I think there was a mistake in the check in of that change. Try getting the latest source code and see if it works for you then. It works for me.
Sep 11, 2007 at 8:30 PM
worked. thanks
Sep 18, 2007 at 10:52 PM
I want to remove the .aspx file extension. I added the appSettings code to web.config, but nothing is different. What am I missing?
Coordinator
Sep 18, 2007 at 11:10 PM
Have you got the latest source code? Nothing happens if you add the appSettings value on the 1.1 release
Sep 18, 2007 at 11:36 PM
When I download the latest source code there is no dll in the /bin/ folder. Where is it?
Coordinator
Sep 19, 2007 at 9:32 AM
CodePlex cannot copy the .ddl file using Team Explorer. You have to compile the BlogEnginge.Core yourself to get the .dll file. It's a very anoying bug in CodePlex.
Sep 19, 2007 at 3:12 PM
Thanks! The latest source code now has the FileExtension appSetting in web.config (defaulted to .aspx), and changing it to .html works. Of course you must map .html to asp.net. Is there any way to setup rewrites/redirects for the url rewrite engine. I want to 301 /default.aspx to / so there are no duplicate content issues in the search engines. I tried using ISAPI Rewrite, but apparently that won't work with BlogEngine.NET.
Sep 23, 2007 at 8:28 PM


defduane wrote:
Thanks! The latest source code now has the FileExtension appSetting in web.config (defaulted to .aspx), and changing it to .html works. Of course you must map .html to asp.net. Is there any way to setup rewrites/redirects for the url rewrite engine. I want to 301 /default.aspx to / so there are no duplicate content issues in the search engines. I tried using ISAPI Rewrite, but apparently that won't work with BlogEngine.NET.


If you don't have a massive number, you could use the built-in asp.net stuff, in system.web section of web.config add:

<urlMappings>
<add url="danny.aspx" mappedUrl="danny.html"/>
</urlMappings>

You'll need a mapping per file.

If you have more, you might want to look at putting something in the top of the error404.aspx file that checks for .aspx extensions and just 301's them to the same file but with the extension replaced.