I just got some space that supports SSI -so I've been playing around including virtual files, which has been great and all worked fine.
I found [123webmaster.com...] this, which appears to be a great tutorial on creating a very simple dbase using SSI.
So I have gone along all the instructions, editited everything that needs to be edited, and when I try the code, here:
<!--#set var="which" value="$QUERY_STRING_UNESCAPED" -->
<!--#if expr="$which != ''" -->
<!--#include virtual="/properties/$which" -->
<!--#else -->
<!--#include virtual="/propeties/error.txt" -->
<!--#endif -->
I get an error: Error processing SSI file '/properties/$which'
I even got as far as contacting my webhost who say I should be able to upload a .htaccess file, which I did, but I am stil getting errors.
All the files are in the right places, as far as I know.
Am I doing something glaringly wrong?
Many many thanks for any pointers.
What are the contents of /properties/$which ?
Are you sure the query string contains a valid filename?
Is the path to /properties correct? You may need the full server path on shared servers eg /home/username/properties or alternatively lose the / at the beginning and just use
<!--#include virtual="properties/$which" -->
I don't know if any of this will help, but it's a few things to check.
the contents of /properties/$which ?
are 13 or so html files, called property1.html, property2.html, property3.html
No not sure about the query string at all - what must be included here?
Will check the permissions, and yes it's possibly a shared server will check that too. THANKS AGAIN.
I just tried to change the permissions on yourpage.shtml and I get this:
[yourpage.shtml]
COMMAND:> SITE CHMOD 766 property.shtml
501 SITE option not supported.
tried to change it to group & public write but apparently not having it?
Is this essential?
(On an NT server right now - and they're just about to change to unix in the next few days.)
I am on a shared server too yes I see /e/blah/mysitename.com in my ftp program. Where else should this path be used?
Once again thanks for your help here.
You *don't* want to do that! So long as it's world readable (possibly group readable depending on the server setup) you'll be OK. The webserver itself generally has the permission rights of world/public so something along the lines of 604 or 644 will be OK (Unix)
>Where else should this path be used?
It really depends on how your server's been set up... If you're seeing /e/blah/mysitename.com in ftp then it's likely you'll need to use it in any script that uses absolute server paths - that is, any path starting with /
Although, I don't know if this is relevant but my error.txt file is only processed, on screen, just below the error when the paths are /properties/ in mypage.shtml
?????
Any ideas?
<!--#set var="WHICH" value="${QUERY_STRING_UNESCAPED}" -->
<!--#if expr="$WHICH != ''" -->
<!--#include virtual="/properties/$WHICH" -->
<!--#else -->
<!--#include virtual="/properties/error.txt" -->
<!--#endif -->
2 things: the query string variable is enclosed in {}s, and I've fixed a typo in the second properties (dunno if this was present in your actual code or just on your post)
This works for me. I don't know why the {}s are needed - I'm using apache, wonder if it's a server-type thing? (I've never used SSI TBH)