Solved

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

Posted on 2007-04-08
4
196 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

Create Professional Looking Email Signatures

Create "Professional HTML Email Signatures" with ease.
7 Day Money Back Guarantee if not 100% Satisfied.
Affordable - Try it out for 7 Days Totally Risk Free.
Installers provided for over 45 Email clients.
Both Windows & MAC Supported.
Highly Recommended!

Question has a verified solution.

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

Suggested Solutions

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.

734 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