Solved

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

Posted on 2007-04-08
4
194 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
ID: 18874335
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
ID: 18875409
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
ID: 18875504
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
ID: 18903558
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why does one computer fail to connect to website? 7 105
WEB Farm 6 69
Issue with SFTP on non-root account using Guacamole  / GUAC 2 82
http to https 3 60
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…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

813 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

18 Experts available now in Live!

Get 1:1 Help Now