PDA

View Full Version : Making One Page Lead To Another


kookbreaker
14th February 2008, 12:10 PM
OK, I have two webpages. One has the content, the other was set-up because its URL was more aesthetic for certain ads I have. Right now, the content page is gaining more info and I want the other page to automatically go to the content page when they go there.

I oddly could not find any HTML pages that tell me how to do this. It seems like it would be a one-line code thing, but is it more complicated than that?

Darat
14th February 2008, 12:15 PM
You mean an automatic redirect? If so see: http://www.web-source.net/html_redirect.htm .

krelnik
14th February 2008, 01:12 PM
The page Darat linked will work, but there are some disadvantages of doing it that way. Some sources I've read say that search engines take a dim view of web pages that redirect using that technique. Also, it's a hair slower than a "true" redirect.

A "true" redirect is when the web server itself replies not with a page of content for the user to see, but with an error code that informs the incoming browser (or search engine robot) that the content has been moved. Google on "301 Redirect" and you will find plenty of information on it.

How to configure a redirect varies depending on the web server you are using. For example, my What's The Harm? (http://whatstheharm.net) site runs under Apache. In Apache, you can set up redirects with a single line in your .HTACCESS file. (If you google ".htaccess" you'll get plenty of additional help).

Here's one line from my .htaccess, which redirects attempts to access /xenu on my server to my Scientology page:


Redirect permanent /xenu http://whatstheharm.net/scientology.html

Rasmus
14th February 2008, 01:23 PM
There should be a way to make both domains point to the same server/ip.

If you are hosting both domains / sites with the same provider, it ought to be quite simple and straight forward to set that up. (If not, it would be more complicated and you might consider moving one of the domains to the hoster of the other.)

I don't know what google would have to say about this.

Come to think of it, I am not sure what you want: A redirect, or both (different) domains displaying the same content. My anser assumes the latter.

kookbreaker
15th February 2008, 10:45 AM
The page Darat linked will work, but there are some disadvantages of doing it that way. Some sources I've read say that search engines take a dim view of web pages that redirect using that technique. Also, it's a hair slower than a "true" redirect.

A "true" redirect is when the web server itself replies not with a page of content for the user to see, but with an error code that informs the incoming browser (or search engine robot) that the content has been moved. Google on "301 Redirect" and you will find plenty of information on it.

How to configure a redirect varies depending on the web server you are using. For example, my What's The Harm? (http://whatstheharm.net) site runs under Apache. In Apache, you can set up redirects with a single line in your .HTACCESS file. (If you google ".htaccess" you'll get plenty of additional help).

Here's one line from my .htaccess, which redirects attempts to access /xenu on my server to my Scientology page:


Redirect permanent /xenu http://whatstheharm.net/scientology.html


I'm not sure what the system is using, and I doubt it is Apache.

I have my main site, which is www.spectrum-scientifics.com

I also have a site that I put in place for ad/promotion purposes (shorter URL) that is www.spectrum-science.com.

Eventually the main site is going to have a shopping cart/data etc. on it, and I cannot just duplicate the first sight on the second. At the same time I do not want to tick off the search engines who think I am playing the google dance.

nimzov
15th February 2008, 11:17 AM
I'm not sure what the system is using, and I doubt it is Apache.
According to netcraft.com, your site seems to be running on FreeBSD, Apache 1.3.29 and PHP 5.2.5

http://toolbar.netcraft.com/site_report?url=http://www.spectrum-scientifics.com

nimzo

kookbreaker
15th February 2008, 11:31 AM
Shows you what I know!

OnlyTellsTruths
17th February 2008, 01:06 AM
Would it be OK for your needs if it redirects with a timed message similar to what message boards use after a reply is posted?

In other words, did you mean "automatically" as without clicking, or more as without someone even knowing?

kookbreaker
20th February 2008, 11:02 AM
The page Darat linked will work, but there are some disadvantages of doing it that way. Some sources I've read say that search engines take a dim view of web pages that redirect using that technique. Also, it's a hair slower than a "true" redirect.

A "true" redirect is when the web server itself replies not with a page of content for the user to see, but with an error code that informs the incoming browser (or search engine robot) that the content has been moved. Google on "301 Redirect" and you will find plenty of information on it.

How to configure a redirect varies depending on the web server you are using. For example, my What's The Harm? (http://whatstheharm.net) site runs under Apache. In Apache, you can set up redirects with a single line in your .HTACCESS file. (If you google ".htaccess" you'll get plenty of additional help).

Here's one line from my .htaccess, which redirects attempts to access /xenu on my server to my Scientology page:


Redirect permanent /xenu http://whatstheharm.net/scientology.html



OK, I obviously did this wrong since what I put in is not working. Its probably something stupid. Can someone look at http://www.spectrum-science/com and tell me what I need to do in order for this to work?

Blue Mountain
20th February 2008, 12:42 PM
You put the redirect into the HTML page. What you want to do is create a file called '.htaccess' with the redirect text in it (without the leading '<' and trailing '>'), and upload that file to the server into the same directory where you put the web page.

Hope this helps!

kookbreaker
20th February 2008, 01:25 PM
It didn't seem to like that...should I have rid myself of something else in the file? Or get rid of the index? I'm confused. Here is the text of the file:

Redirect permanent http://www.spectrum-science.com http://www.spectrum-scientifics.com

But it results in a 500 internal Server Error

Blue Mountain
22nd February 2008, 08:33 AM
Sorry for the delay in replying.

I recommend you do the following:
1. Create a file called ".htaccess" on your computer
2. Put one line into that file:
RedirectMatch permanent .* http://www.spectrum-scientifics.com/
3. Upload the .htaccess file to the web server that hosts spectrum-science.com

If you're still getting server errors after doing this, let us know here and we'll show you how to do a redirect in your HTML.

kookbreaker
22nd February 2008, 01:37 PM
OK. I made the file, but I need it doesn't work in the httpdocs directory. Should I have put it in the cgi-bin directory? It won't let me put it in the root directory.

Blue Mountain
22nd February 2008, 04:33 PM
The httpdocs directory is the correct place for the .htaccess file.

I'm getting 500 Server Error when connecting to spectrum-science.com. Unfortunately, I don't know what's causing the error. If the system's hosted on Linux, it's possible it's a permissions problem. Is there any way you can see the server's error log? Is there a tech support line who can assist?

Also, how do you transfer files from your computer to the server: FTP, WebDAV, or some other means?

kookbreaker
22nd February 2008, 06:22 PM
I just chatted online with tech support. The Redirect Command is suspended for security reasons. I have put in a ticket with their senior tech people to see what they can come up with.

Blue Mountain
22nd February 2008, 10:35 PM
The following HTML should work:


<html>
<head>
<meta http-equiv="refresh" content="1;http://spectrum-scientifics.com/" />
</head>
</html>


I say "should work", because it's the user's browser that will do the redirect, not the remote server. Thus the security restriction your ISP has in place is bypassed.

kookbreaker
23rd February 2008, 05:39 AM
OK, but is that the method that search engines take a dim view of as mentioned in post #3?

Blue Mountain
23rd February 2008, 02:49 PM
OK, but is that the method that search engines take a dim view of as mentioned in post #3?
Indeed it is. So you should consider it as a temporary solution until you can get something worked out with your web hosting provider.

kookbreaker
23rd February 2008, 05:16 PM
Never mind. The html is working for now.