Forum Moderators: coopster & phranque

Message Too Old, No Replies

Redirecting users to a script whilst remaining searchable?

Redirect

         

Malcolm

6:49 pm on Jun 16, 2003 (gmt 0)

10+ Year Member



Hi, I'm hoping I might get some help with a little problem. I have a script at http://www.domain.net/cgi-bin/script.cgi

What I'm after is user entry instantly into the site script from typing the domain address at www.domain.net

It doesn't matter what the address bar shows as long as typing www.domain.net takes the user straight to http://www.domain.net/cgi-bin/script.cgi

Natrually I want the site to be visible to search engine spiders/robots.

I'm really struggling with this one and any help would be greatly appreciated.

Thank you,

Malc

[edited by: jatar_k at 6:57 pm (utc) on June 16, 2003]
[edit reason] no urls thanks [/edit]

Drewser

8:21 pm on Jun 16, 2003 (gmt 0)

10+ Year Member



Does it not work if you make the index.html a link to your script? You may have to make it a normal link as opposed to a symbolic link. Or do you need the index.html for something else?

olwen

9:08 pm on Jun 16, 2003 (gmt 0)

10+ Year Member



What about index.php


<?php
header("Status: 301 Moved Permanently");
header("Location: /cgi-bin/script.cgi ");
?>

DrDoc

10:49 pm on Jun 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What about index.php

This might confuse the search engine, depending on any headers already sent by the server.

It's better to handle redirects in .htaccess

marcs

10:58 pm on Jun 16, 2003 (gmt 0)

10+ Year Member



How about a .htaccess file with this :

DirectoryIndex /cgi-bin/script.cgi

Currently using this for a client which works fine and domain.com results in a 200 OK not a redirect, so search engines should be OK.

olwen

11:13 pm on Jun 16, 2003 (gmt 0)

10+ Year Member



I've just tried that on my site,and it redirects all directories, which is not what I want. I'd be wary of this if you have more than one directory.

Actual headers from my site where I use a php file to redirect to a directory called hmx are.


HTTP/1.1 302 Found
Date: Mon, 16 Jun 2003 23:14:36 GMT
Server: Apache/1.3.27 (Unix) mod_bwlimited/1.0 PHP/4.3.1 DAV/1.0.2 mod_log_bytes/1.2 FrontPage/5.0.2.2510 mod_ssl/2.8.14 OpenSSL/0.9.5a
X-Powered-By: PHP/4.3.1
Status: 301 Moved Permanently
Location: /hmx
Connection: close
Content-Type: text/html

Is this likely to be causing problems?