Using forward slashes in umbracoUrlName - path

I'm trying to transfer an existing .NET site into Umbraco and trying to use the umbracoUrlName to set the URLs for pages to map to their existing URLs so that inbound links still work and it doesn't affect SEO. I'd really rather avoid forwarding, but the problem is that some of these pages are in different folders and umbracoUrlName seems to ignore slashes.

You are right, umbracoUrlName ignores slashes. You will either have to put redirects in place using something like the 301 Url Tracker or place the nodes inside other nodes to simulate the folder structure.
Alternatively, you could use umbracoUrlAlias which does accept forward slashes. This doesn't change the original url, but it does give the page an alias that can also be used to access the node.

I know this is an old issue and it depends what version of Umbraco you're on but look at the IUrlProvider to solve your issue - this blog post has all the details:
http://24days.in/umbraco/2014/urlprovider-and-contentfinder/

Related

What are URL codes called?

I came across a website with a blog post teaching all how to clear cache for web development purposes. My personal favourite one is to do /? on the end of a web address at the URL bar.
Are there any more little codes like that? if so what are they and where can I find a cheat sheet?
Appending /? may work for some URLs, but not for all.
It works if the server/site is configured in a way that, for example, http://example.com/foo and http://example.com/foo/? deliver the same document. But this is not the case for all servers/sites, and the defaults can be changed anyway.
There is no name for this. You just manipulate the canonical URL, hoping to craft a URL that points to the same document, without getting redirected.
Other common variants?
I’d expect appending ? would work even more often than /? (both, of course, only work if the URL has no query component already).
http://example.com/foo
http://example.com/foo?
You’ll also find sites that allow any number of additional slashes where only one slash used to be.
http://example.com/foo/bar
http://example.com/foo////bar
Not sure if it affects the cache, but specifying the domain as FQDN, by adding a dot after the TLD, would work for many sites, too.
http://example.com/foo
http://example.com./foo
Some sites might not have case-sensitive paths.
http://example.com/foo
http://example.com/fOo

why two slashes in this web directory

Google stopped crawling my webpage because my robots.txt file was inadvertently moved. It said I should try making sure it is there by going to the address: http://www.site.com//robots.txt. It had two slashes just like that. But it still works. It also works with three. What's up with that? Even if I can sort of see why it could be ignored—I'm not specifying any directory between the two—why would it be preferential to display a url like this, as the google webmasters' page does?
Most (all?) servers seem to allow several slashes directly after the hostname (not in other positions, though), see for example:
http://www.google.com//////////robots.txt
https://stackoverflow.com/////robots.txt
http://en.wikipedia.org////////////////////////robots.txt
(Related question: How to avoid multiple slashes after domain name in url using htaccess?)
However, when Google Webmaster Tools displays the URL with two slashes, you probably have set your domain in the GWT preferences with a trailing slash (http://example.com/ instead of http://example.com). See this question for Google Analytics (I guess it should be similar for GWT).

Changing links for old url to new url?

I have changed my domain name and i really don't want to go through the trouble of making all the links i have posted in the articles in my website to the domain name. Is there a code i can use to make all the links to the old domain change.
For example, if i have a link somewhere that is oldurl.com/faq
and i want it to change to newurl.com/faq
But without rewriting it manually, so it does it for all the links on my website that start with oldurl.com
How would i do this?
You can point the DNS for the old domain to the new domain, and place a redirect rule in the webserver to rewrite to the proper domain.
This is probably something you should do anyway to have any external links that you have no control over be pointed to the proper new location.
This however is not a substitute for fixing your actual links. You should fix these as well. In fact it is usually best proactice to not include the full URL on internal site links, instead using only URI's or relative paths for such links.
Most any good IDE will give you the ability to search and replace across all file in a site, so doing this should not be too painful.
This is the quick and lazy way to do it.
$(function(){
$('a').attr('href', function(x, url){
return url.replace('oldurl.com', 'newurl.com');
});
});

How to improve the structure of URLs

From the article at google's webmaster center and SEO's pdf, I think I should improve my website's URLs structure.
Now the news url looks like "news.php?id=127591". I need to rewrite it to something like "/news/127591/this-is-article-subject"
The problem is if I change the structure of url to the new one. Can I still keep the old one working? If both url working, how to avoid search engine like google and bing to search twice times for one article?
Thanks!
HTTP 301 permanent redirect from the old URL to the new URL
an HTTP 301 redirect has the property of communicate a new (permanent) URL for an old (outdated) ressource to google (and other clients). google will transfer most/all of the allocated value from the old URL to the new URL.
Also, in order to improve the arquitecture of your website, you must keep a clean structure by inserting links within all its pages/posts. But be careful, you must not do this lightly, or Google´s robot will get confused and leave.
Structure is key to your SEO
1. Find one page which is the "really important page" for any given keyword
2. direct relevant content from other pages which is relevant to that particular kw
3. repeat with every relevan kw
I´m gonna leave this post for you, where I explain this more in depth, hoping that you understand spanish. http://coach2coach.es/la-estructura-web-es-la-base-del-posicionamiento/
Yep.. you can use robots.txt to exclude news.php, and create an xml sitemap with the new URLs. mod_rewrite can be set to only change directories, with trailing slashes.. so all files in your root directory should work fine.

Removing /dotnetnuke/ in all page urls

We want to remove the /dotnetnuke/ from all 300 pages of our website that has been running since Feb 09.
Google isn't indexing all of our pages just 98. I'm thinking that the /dotnetnuke/ is causing our content to be too deep in our site for Google to find(?)
We also don't have any Page Rank although our site appears on page one for most search queries. Obviously we don't want to lose our position in Google.
Would you advise that we do remove the /dotnetnuke/ in our urls and if so should we create a new site and use 301 redirects or is there a way of removing the /dotnetnuke/ from our existing urls but still keeping our Google history?
Many thanks
DotNetNuke uses its own URL rewriting which is built in to the framework. DotNetNuke uses the provider model, so you can also plug in your own URL rewriter or secure one from a third party. If that is what you need, I'd suggest taking a look at Bruce Chapman's iFinity URL Rewriter as a quality free third party extension to DotNetNuke. He also offers a fancier commercial version called URL Master, which I haven't needed to use as of yet.
However, I believe the /dotnetnuke/ you're referring too may not actually be part of your "pages," but the actual alias of your DotNetNuke portal (i.e. www.yoursite.com/dotnetnuke). This would mean that /dotnetnuke/ is part of your base path for all pages because using the base path as an identifier is how DotNetNuke determines that you want to load a particular portal. If this is the case, you could potentially just change your portal alias to be www.yoursite.com (depending on the level of access you have to the site/server).
Lastly, sometimes virtual pages do not get included in DotNetNuke's site map. If you are using a third party module for your dynamic content - it may in fact not be represented on your site map. I'd look in to what pages are currently represented on your site map as well.
In IIS7 you can use URL rewrite functionality to hide /dotnetnuke/.
301 redirect will also work fine (just make sure you are not using 302 - Google doesn't like it)
Another answer in adition to the first 2 is that you are running DNN on GoDaddy hosting. Godaddy has a strange way of setting up sites here is how you can remove that problem
Set up a second (non primary) domain. Under domain management, you can actually assign the second domain to point to a subdirectory. Make sure that the subdirectory is whatever you set dnn to
Might have this wrong as i got it off godaddys site but have done it twice and got it to work correctly

Resources