I've been reading the various instructions on how to take off the .aspx from the end of URL's and I have managed to do that using the method on the bottom of this page:
Locate <httpModules> node and add a single attribute
preCondition into the UrlRewriteModule node; it is required that the
attribute is empty. Your entry should look like this: <add
name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule,
UrlRewritingNet.UrlRewriter" preCondition="" />
This works fine but I needed to add a trailing "/" on the end instead
ie www.mysite.com/home/
rather than
www.mysite.com/home (I have this at present)
I have read various topics but I'm still confused as to whether this is a 301 redirect thing or I have to change the rewrite rules? Any advice would be greatly appreciated. I can also see the issue with SEO and duplicate content:
ie www.mysite.com, www.mysite.com/home, www.mysite.com/home/ and www.mysite.com/home.aspx are all the same?! How do you get round this?
Any help or links to topics I've missed would be great. Thanks in advance :)
As for doing it the "proper way" - there are a few options, but all revolve around URL rewriting. You could use the built-in UrlRewriting.net (via the /config/UrlRewriting.config), or using IIS7 rewrite rules (via the Web.config) ... or use something else? e.g. an ISAPI_Rewrite module to make use of .htaccess files (often easier because there are LOADS of .htaccess examples out there!)
It was written a couple of years ago - just before IIS7 was release, so it does reference the module as a download, but ignore that, as it is a part of IIS7 now!
Adding trailing "/" after flat URL
Hi Everyone,
I've been reading the various instructions on how to take off the .aspx from the end of URL's and I have managed to do that using the method on the bottom of this page:
http://our.umbraco.org/wiki/install-and-setup/setting-up-umbraco-for-friendly-urls
This works fine but I needed to add a trailing "/" on the end instead
ie www.mysite.com/home/
rather than
www.mysite.com/home (I have this at present)
I have read various topics but I'm still confused as to whether this is a 301 redirect thing or I have to change the rewrite rules? Any advice would be greatly appreciated. I can also see the issue with SEO and duplicate content:
ie www.mysite.com, www.mysite.com/home, www.mysite.com/home/ and www.mysite.com/home.aspx are all the same?! How do you get round this?
Any help or links to topics I've missed would be great. Thanks in advance :)
Sorry, posted this twice and the other thread wont delete? I get the 'thread deleted' page and then back on the forum, it's still there.
Hi Sam,
The quickest and "easiest for SEO" way around this is to use a canonical link to specify the URL.
Take a look at the Canonical meta link package - or roll your own?
As for doing it the "proper way" - there are a few options, but all revolve around URL rewriting. You could use the built-in UrlRewriting.net (via the /config/UrlRewriting.config), or using IIS7 rewrite rules (via the Web.config) ... or use something else? e.g. an ISAPI_Rewrite module to make use of .htaccess files (often easier because there are LOADS of .htaccess examples out there!)
Cheers, Lee.
Thanks Lee,
I'll give it a shot via web.config. Not 100% where to put the rules though, will experiment.
Sam.
Hi Sam,
There's an introduction article over on IIS.net: http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/
It was written a couple of years ago - just before IIS7 was release, so it does reference the module as a download, but ignore that, as it is a part of IIS7 now!
Cheers, Lee.
This works for me just fine:
Thanks for the help Lee and the link/info, will read up more about it for future reference :)
Regards,
Sam.
Thanks this helped me!
is working on a reply...