Results 1 to 9 of 9
  1. #1
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    what I want to do is:- I have an ordinary text file and I want to be able to use SSI in it to call for another text files contents.
    1/. can this be done?
    2/. would you please explain to me how to do it?

    Thanks in advance
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  2. #2
    ABW Ambassador Greg Rice's Avatar
    Join Date
    January 18th, 2005
    Location
    Ohio
    Posts
    4,889
    Never heard of that being done before so maybe someone else will come up with a better idea. The only thing that comes to mind is Apache's mod rewrite. Perhaps you could tell Apache to treat the text file as a file type that can use SSI, like PHP. If I knew the syntax I'd give it. I use mod rewrite to make dynamic pages show as HTML and my experience is limited but while researching it I learned much about it capabilities.
    Greg Rice Affiliate Program Management
    www.gocmc.com info(AT)gocmc.com | 330-259-1223

    Join us! - MiNeeds.com | DiscountCandleShop/CheeseSupply | Feng Shui Plaza

  3. #3
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    1,356
    Paste the text file between plain vanilla html tags along with the include call.

  4. #4
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    Could you explain that please Chief_Bobbit I have no idea whatsoever what you mean by "Paste the text file between plain vanilla html tags along with the include call."

    Thanks for your reply but I just do not understand.

    Maybe I should add I want the SSI call in my various sites robots.txt files. The reason being I have quite a number of sites, as do a lot of us, but I want to be able to use just one robots.txt and be able to call it from all my sites so that when I update usually to ban another spider or bot then all my sites will update to the same.

    I don't know if this can be done but it would save some work if it can.
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  5. #5
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    go into your httpd.conf file and put

    Alias /robots.txt "/usr/path/to/html/robots.txt"
    Then restart apache

  6. #6
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    I know what your next post is heyder, yes I am a dickhead : but I cannot find a file named httpd.conf or even one that starts with httpd.
    Could you please tell me where I am most likely to find it?

    Will it be an invisible one like the .htaccess file that I had to use a filter to see it? if so what filter do I use?
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  7. #7
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    You know what Gordon I think it's possible to just put that same line in your .htaccess file. Try that and then go to yourdomain.com/robots.txt and see if it works. You'd have to do it with every domain but only have the robots.txt file in one location.

    Otherwise you'd have to go into your server as root and access apache. This all varies with every setup. I wasn't sure what your hosting situation is.

    Otherwise if you have shell access just type in locate httpd.conf to see where it is.

  8. #8
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    Thank you very much Heyder,
    I do not have access to my server root or shell so I'll try it in the .htacess file and hope it works.
    Thanks again.

    I tried it but it would not work, it just kept closing my site down ah well the thought was there maybe if I get a VPS in the future it might work
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  9. #9
    ABW Veteran Student Heyder's Avatar
    Join Date
    January 18th, 2005
    Posts
    5,482
    I wonder why it doesn't work. It should work

    Make sure your path to the robots.txt is correct on the server.

    Ah I think I know what's going on. It's probably the format of what I told you to write. Hopefully some htaccess buff could chime in and give you the right way to do it. I bet you can't put the " marks in or something like that.

  10. Newsletter Signup

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •