clean URLs, friendly URLs on shared hosting, remove ".aspx"
Greetings all,
I'd like to use clean URLs with Umbraco on my shared hosting account at SoftSys (removing ".aspx" from URLs). I tried modifying the web.config for Umbraco as follows:
And then republishing the entire site. However, this didn't have any effect. SoftSys says they support clean URLs, but that I need to create an additional IIS rule in web.config so it will handle clean URLs. I would appreciate if anyone has guidance or pointers on if this sounds correct, and if so what rule do I need to add to web.config?
In IIS 6, you will need access to the server. I had to go into the Properties, and then into the Home Directory tab. Then click 'Configuration'. You will need to add a 'wildcard application map' to the aspnet_isapi.dll (often found here C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll).
From my experience, this is something that you can not do from within a web.config. Also from my experience, you will need to call up the hosting company and ask them to do this. Strangely, you might have to step them through the process.
If you're trying to get it to work on IIS7, then the steps will be different.
When I look at the "Link to document", it has the correct path (such as "/home" not "/home.aspx"). However clicking on that link results in a 404 page while navigating to /home.aspx loads the page properly.
Chad,
Looking at the IIS docs, it looks like I could add a rewrite rule section to web.config, something like as follows. I'm curious if you'd tried this and it didn't work? I'd like to try it but I'm having trouble finding the magic code for the specific rewrite rule I want (remove .aspx):
<rewrite> <rules> <rule name="Rewrite to article.aspx"> REWRITE RULE GOES HERE </rule> </rules> </rewrite>
If you're on SoftSys you should be running IIS 7 and shouldn't actually have to do anything, except for the appSetting key you've already changed. Sorry that's not much help. Does the page work if you hit /home.aspx instead of /home?
Thanks for taking the time to reply. It turns out that I needed to purchase a dedicated app pool at Softsys, in order for them to make the necessary changes to the IIS settings for my account. Once I did that and they made the changes, the Umbraco "add key" rewriting rule worked as it should.
If I manually remove the .aspx from my URL, the page displays just fine. However, links shown in the Properties tab and links generated by NiceURL in XSLT macros still have the .aspx. I'm running v.4.5. What do I need to do?
Sorry for the double post, but I don't really know where to put this. I have removed the aspx from my URLs with the help of this and setting the umbracoUseDirectoryUrls key to true, will this affect negatively my search engine rankings or number of indexed URLs?
clean URLs, friendly URLs on shared hosting, remove ".aspx"
Greetings all,
I'd like to use clean URLs with Umbraco on my shared hosting account at SoftSys (removing ".aspx" from URLs). I tried modifying the web.config for Umbraco as follows:
<add key="umbracoUseDirectoryUrls" value="true" />
And then republishing the entire site. However, this didn't have any effect. SoftSys says they support clean URLs, but that I need to create an additional IIS rule in web.config so it will handle clean URLs. I would appreciate if anyone has guidance or pointers on if this sounds correct, and if so what rule do I need to add to web.config?
Thanks,
-NorthK
When you republished the entire site and look on one of you content nodes, what does "Link to document" on the Properties tab say?
In IIS 6, you will need access to the server. I had to go into the Properties, and then into the Home Directory tab. Then click 'Configuration'. You will need to add a 'wildcard application map' to the aspnet_isapi.dll (often found here C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll).
From my experience, this is something that you can not do from within a web.config. Also from my experience, you will need to call up the hosting company and ask them to do this. Strangely, you might have to step them through the process.
If you're trying to get it to work on IIS7, then the steps will be different.
kipusoep,
When I look at the "Link to document", it has the correct path (such as "/home" not "/home.aspx"). However clicking on that link results in a 404 page while navigating to /home.aspx loads the page properly.
Chad,
Looking at the IIS docs, it looks like I could add a rewrite rule section to web.config, something like as follows. I'm curious if you'd tried this and it didn't work? I'd like to try it but I'm having trouble finding the magic code for the specific rewrite rule I want (remove .aspx):
Any other ideas guys?
Thanks,
-NorthK
@North
You do not have to add rewriting rules. Umbraco takes care of that.
You have to let IIS dispatch the requests to ASP.NET. How you can do that explains Chad (or maybe the hosting company?)
If you're on SoftSys you should be running IIS 7 and shouldn't actually have to do anything, except for the appSetting key you've already changed. Sorry that's not much help. Does the page work if you hit /home.aspx instead of /home?
What version of Umbraco. If you're at 4.0.x then you will need to get the web.config for integrated pipelines.
If you're using 4.5 then you don't need to do anything.
Then at Softsys make sure you are using intgrated pipelines (in the extension tab for your website).
Use 4.0 integrated if you are using Umbraco 4.5, otherwise 2.0 integrated.
No other changes to IIS are required
All,
Thanks for taking the time to reply. It turns out that I needed to purchase a dedicated app pool at Softsys, in order for them to make the necessary changes to the IIS settings for my account. Once I did that and they made the changes, the Umbraco "add key" rewriting rule worked as it should.
Thanks again,
-NorthK
If I manually remove the .aspx from my URL, the page displays just fine. However, links shown in the Properties tab and links generated by NiceURL in XSLT macros still have the .aspx. I'm running v.4.5. What do I need to do?
Connie, have you re-published the entire site?
It works now. I was looking at the value in my backup web.config instead of the live copy.
Sorry for the double post, but I don't really know where to put this. I have removed the aspx from my URLs with the help of this and setting the umbracoUseDirectoryUrls key to true, will this affect negatively my search engine rankings or number of indexed URLs?
is working on a reply...