Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 194
  • Last Modified:

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?
0
tilmes
Asked:
tilmes
  • 8
  • 6
  • 5
1 Solution
 
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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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
 
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

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

  • 8
  • 6
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now