Solved

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

Posted on 2007-04-08
4
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Percona Monitoring and Management and Grafana

Proactive monitoring is vital to a highly-available environment. We have a quick start guide on Experts Exchange for Grafana users.

Question has a verified solution.

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

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to count occurrences of each item in an array.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

628 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