need to show texts only under main domain name, not under any file or directories.


i need to show texts only at main home page like www.abcd.com/, under main domain name not at www.abcd.com/something/ or other levels of directories or under file name.
This info will be inserted in index.cgi.
How can i do this?
tilmesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TintinCommented:
What sort of text?  Dynamic?  

Generated via SSI or CGI?
0
tilmesAuthor Commented:
It is just static text like "here is text"
0
TintinCommented:
I don't understand your question then.

What different behaviour do you want over a static index.html page?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

tilmesAuthor Commented:
this code will write in index.cgi.

There are many directories and file names under abcd.com
like abcd.com/car/, abcd.com/car/name.html and so on.
The text "here is text" must show only under www.abcd.com/
and not under any other diretories and file names.
0
gruntarCommented:
...and in what directory wil index.cgi reside? Wil you have copies of this file in every directory?

Cheers
0
tilmesAuthor Commented:
index.cgi is only direct under abcd.com
so it is, www.abcd.com/index.cgi
0
TintinCommented:
I still don't understand.

Why have an index.cgi if you just want static text in it?

And if you do want to use an index.cgi, then what's the problem with adding the static text?

What does index.cgi look like at the moment?
0
tilmesAuthor Commented:
The site uses also rewrite mode so index.cgi shows/generates from  diferent directories.
0
gruntarCommented:
So how will you have those dirs then? Will you be using "virtual" directories?
0
tilmesAuthor Commented:
Hello gruntar,
i don't udnerstand your quetion. Please refer to my commant at Date: 11/30/2004 10:37PM CET
0
gruntarCommented:
Hm, ok.

if you have file index.cgi only in your root folder, I don't see how could that file do anything in dir abcd.com/car/name.html or any other than abcd.com/.

Can you explain that...
0
TintinCommented:
I think at this stage, it would be best to show us the contents of index.cgi.
0
gruntarCommented:
Yea, and how do you plan to do this?
0
tilmesAuthor Commented:
i need code works same as in this php
$pi = parse_url($_SERVER['REQUEST_URI']);
if ($_SERVER['SERVER_NAME'] == 'www.bacd.com' and $pi['path'] == '/') {
0
tilmesAuthor Commented:
/cgi.cgi?search_and_display_db_button=on&query=jome/car
this will be abcd.com/home/car/
with apache rewrite mode.
0
gruntarCommented:
So, why don't you do this in PHP? I don't know if you can include files in perl that can be processed...
0
TintinCommented:
What sort of code?  Perl?  You haven't specified, so I'll assume Perl.

The equivalent of the PHP code in Perl is:

if ($ENV{SERVER_NAME} eq 'www.bacd.com' and $ENV{REQUEST_URI} eq '/') {
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TintinCommented:
I must admit, I still don't understand what is trying to be done.
0
tilmesAuthor Commented:
Thanks tintin.
The text shows now only under www.bacd.com/
and not any other second level of directories and file names.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.