Web Space Question PHP?

Started by sparky, Jul 20, 2011, 17:39:47

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

sparky

I have started to create a personal web site using my idnet web space, purely for family and educational reasons, but I have become aware that a google search will show it up and allow access to all and sundry, so at the moment I can't put too much personal info on it.

I'd really like to password protect it, I don't suppose idnet's webhosting (ie. free web space) supports PHP does it?

Rik

It doesn't, sorry. You could probably use htaccess to password protect, though.
Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

Bill

It won't block access to anyone who finds it by some other method, but how about using a robots.txt file?
Bill
BQMs-  IPv4  IPv6

sparky

#3
I guessed it probably didn't.

What is htaccess Rik? Well, I've kind of got a rough idea that I have would have to use something to create a txt file with an encrypted password in it ???  And put it in my web space?   Any pointers on how to go about it?  Thanks.

Ray

Ray
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

Niall

If you're interested, you can actually use a wordpress blog, and within that you can stop it listing the site on google. Or at least as long as the spider bots don't see it. I'm not sure how it worked, but when I had my last site I accidentally turned that feature on and you couldn't find the site for love nor money :D

I don't actually use my webspace. I did set it up using the wordpress that IDnet offered, but left it and when a virus embedded in it I asked IDnet to delete the whole thing for the sake of safety to others (aint I kind? ;D).

I've actually just bought the domain for my name and will have a site up myself soon(ish), so if this feature still works I'll let you know :)
Flickr Deviant art
Art is not a handicraft, it is the transmission of feeling the artist has experienced.
Leo Tolstoy

sparky

Thanks for the quick replies guys.

Bill, that one's blown me away!  I'll have to have a close look at that tomorrow when my brain aches less.

Ray, Thanks. That looks good. I'll give it a try.  :thumb:

Niall, I'm new to this website business, my knowledge is limited and I haven't heard of that,  but thanks, I'll have to investigate further.

Plenty to occupy myself with tomorrow then!

Bill

Most people just use the basic one for personal websites:

User-agent: *
Disallow: /

Basically it says: "if you're a webcrawler, sod off" ;D
Bill
BQMs-  IPv4  IPv6

kinmel



Most crawlers comply with robot.txt, I rarely have problems on the sites I include it on
Alan  ‹(•¿•)›

What is the date of the referendum for England to become an independent country ?

sparky

Ok then. Have I done this right?
Using notepad, I have created a file called robots.txt and in it I have put:-

User-agent: *
Disallow: /

Nothing else, then saved the file as robots.txt. I have then ftp'd it to my webspace, but is it at the right level?



Rik

It should be at the root level of your space.
Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

sparky

I'm not a linux/unix person i'm afraid.

I don't know where that is, or how I get a file into it using ftp (I'm using FileZilla)  Can you advise?

Rik

You should 'land' on your root page when you launch your FTP client.
Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

sparky

When I launch FileZilla, the remote side of the window looks like this:-


Rik

You appear to be at a level below the root, but I use a different FTP client. Try double-clicking on the top folder shown.
Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

Lance

The root will be where the index.html is I expect.
Lance
_____

This post reflects my own views, opinions and experience, not those of IDNet.

sparky

BTW Thanks for your help on this Rik and everyone.

Double clicking Images displays the contents of that folder.
Double clicking the top folder shows the contents exactly as the previous post. I don't appear to be able to get to a higher level directory. If I try and drag robots.txt to the top directory shown, I get the message "source and target of the drop operation are identical".

Another problem that I have is with .htpasswd and .htaccess. There is a line in .htaccess that reads "AuthUserFile /BASEDIR/.htpasswd" where BASEDIR has to be the "Path to the root directory".........how can I find that out?

I'm beginning to think Im getting in over my head here..... :dunno:

QuoteThe root will be where the index.html is I expect.

Does that not mean that I am already in Root then?  ???

Lance

Now I'm on the laptop and not my phone - and can see the picture you posted - and can confirm that is your root.
Lance
_____

This post reflects my own views, opinions and experience, not those of IDNet.

sparky

Lance,

Many thanks. I suspected as much as I didn't seem to be able to get any higher up the tree.

sparky

Sorry to be a pain guys, but can anyone help on this one?

I have created a .htpasswd and a .htaccess file and put them both into the same directory as my index.html is in.

.htaccess contains:-
AuthName "Realm name"
AuthType Basic
AuthUserFile /username/.htpasswd
require valid-user


.htpassswd contains:-
Username:encryptedpassword

When I tried to access my website, it asked for user name and password, but when I entered it I got an Internal Server error. I am guessing, that this is because I haven't got the pathname to the htpasswd file correct in the .htaccess file under "AuthUserFile".

After this, it doesn't matter what changes I make, I just always get the Internal Server Error message, it doesn't ask for a username and password again.  If I delete both files, I am back to where I was and can access my website just fine.

Anyone know what my "AuthUserFile" path should be or can tell me where I have gone wrong?

Many Thanks.

Rik

Rik
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

Technical Ben

Quote from: Niall on Jul 20, 2011, 17:58:45
If you're interested, you can actually use a wordpress blog, and within that you can stop it listing the site on google. Or at least as long as the spider bots don't see it. I'm not sure how it worked, but when I had my last site I accidentally turned that feature on and you couldn't find the site for love nor money :D

I don't actually use my webspace. I did set it up using the wordpress that IDnet offered, but left it and when a virus embedded in it I asked IDnet to delete the whole thing for the sake of safety to others (aint I kind? ;D).

I've actually just bought the domain for my name and will have a site up myself soon(ish), so if this feature still works I'll let you know :)
I'm not sure how to setup a wordpress blog on the IDNet space. Any tips? It would be a heandy thing to have one setup for when I want to use it. :)
I use to have a signature, then it all changed to chip and pin.

sparky

#22
Rik,

No not really. I have read through what I can understand. If .htaccess should allow me to set up a password for my webspace as you suggested earlier in the thread that it should, I think my basic problem is that I don't know what the full path name to my directory is to put under AuthUserFile in .htaccess.  This is the information I am not sure of:-

AuthUserFile /full/path/to/.htpasswd
AuthType Basic
AuthName "My Secret Folder"
Require valid-user

Where:

/full/path/to/.htpasswd should be the full path to the .htpasswd file that you uploaded earlier. The full path is the path to the file from the Web server's volume root - for example, /home/username/.htpasswd or C:\wwwroot\username\.htpasswd. (If you're not sure of the full path to your site or home directory, ask your Web hosting company for this info.)


Ray

You
Quote from: Technical Ben on Jul 22, 2011, 09:29:44
I'm not sure how to setup a wordpress blog on the IDNet space. Any tips? It would be a heandy thing to have one setup for when I want to use it. :)

You've already got the option to set up a Wordpress blog on your Idnet webspace if you go to your account settings and then Free extras, Ben.
Ray
--------------------

This post reflects my own views, opinions and experience, not those of IDNet.

sparky

#24
All,

Well, I have just had this back from support.......................

"The free webspace does not support password protection using .htaccess.

Kind regards,

IDNet Support"

So I guess that means there is no way to password protect a web site in the free web space.