Results 1 to 9 of 9
July 24th, 2004, 01:32 PM #1
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
July 24th, 2004, 02:22 PM #2
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.
July 24th, 2004, 03:11 PM #3
- Join Date
- January 18th, 2005
Paste the text file between plain vanilla html tags along with the include call.
July 24th, 2004, 03:21 PM #4
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.
July 24th, 2004, 03:55 PM #5
go into your httpd.conf file and put
Alias /robots.txt "/usr/path/to/html/robots.txt"
Then restart apache
July 24th, 2004, 05:19 PM #6
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?
July 24th, 2004, 05:37 PM #7
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.
July 24th, 2004, 05:45 PM #8
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.
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
July 24th, 2004, 06:47 PM #9
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.