Solved

URL links in the form "www.somesite.com/-pagename"

Posted on 2007-04-08
4
193 Views
Last Modified: 2011-09-20
I just moved a website to a new host. It contained many URL links in the form "www.somesite.com/-pagename", which the new host did not seem to understand. I converted them all to the form "www.somesite.com/pagename.html", which made the new host happy, BUT broke any external links in the "dash" form from other sites.

1. Is there anything I can change on the new host and/or new site to make the external links start working again?
2. I thought page names were REQUIRED to start with a letter -- why did the "dash" format work on the old site, and why would external sites use that format?

0
Comment
Question by:dossbob
  • 2
4 Comments
 
LVL 5

Expert Comment

by:DToolshed
Comment Utility
What is the new webserver? Windows based? Linux based?

www.somesite.com/~pagename.html is a common format, and while I haven't seen dash used for it, it is likely that it was the same thing. It's sort of a virtual redirect. It tells the webserver to pull the page out of a users public_html folder (usually) instead of the main websites directories. There is a brief explanation of it here: http://www.webdeveloper.com/drweb/questions.html#tilde

Your current webserver would need to be setup in a similar way to provide that function. Not usually very difficult, but how you do it depends on the server, and who is doing the hosting.
0
 
LVL 8

Expert Comment

by:thur6165
Comment Utility
What your previous host was doing i'm not sure, but what if you simply so thru and remove the - from your external links.  May be less trouble than getting your host to change the web server, they probably wont be willing to either.
0
 

Author Comment

by:dossbob
Comment Utility
I don't have control over the external links. I happen to know of the one that was reported as broken, and will ask that webmaster to change his/her link. But there could be zero, one, or many others that I don't know about yet.

If the dash is "common" usage (like the tilde), I want to learn how to deal with it properly.

But if it's something odd about the old host, I can just ignore the potential problems until someone reports a broken link on some as-yet unknown site.
0
 
LVL 5

Accepted Solution

by:
DToolshed earned 500 total points
Comment Utility
2 ways to deal with external link. One is wait until someone asks you about it, the other is make a page in the server to redirect to the correct page.

If the dash or tilde was used as a public_html folder redirect, then you would need to setup something like that on the new server to redirect to the correct new page. I don't know if ignoring the issue is really good, since it can frustrate end-users, who may not report the problem.

Possibly, you could add a custom 404 page with a script to grab any attempts to access a -pagename.html, strip the actual pagename out, and do a 301 redirect to that page if it exists, and give an actual 404 error page if it doesn't. This page (http://www.stevenhargrove.com/redirect-web-pages/) covers the major website server scripting languages. (PHP, ASP, CGI, etc.) This might be the best permanent solution, as any external links will still work, and it gives a subtle clue to users that they should update their bookmarks.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Chrome to Chrome History Import 6 54
Problem to echo 6 51
Nameserver and MX Record 2 43
whm high memory usage in processes 7 34
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now