Here's what I learned on Week 5:
1) Physical path to the root of my space on zephir;
/home/classes/ldelro02
2) Physical path to the root of my web space on zephir
/home/classes/ldelro02/public_html
3) Commands to get to my sandbox from the root of my space
cd public_html
cd Sandbox
4) Command to see all files and folders in the current directory
ls -l
5) Here are some rules regarding file permissions:
drwxrwxr-x 4 ldelro02 ldelro02 4096 Apr 23 17:13 redsplash
drwxrwxr-x 3 ldelro02 ldelro02 4096 Apr 16 15:38 RedTie
-rw-rw-r-- 1 ldelro02 ldelro02 88 Apr 9 17:55 template.php
-rw-rw-r-- 1 ldelro02 ldelro02 111 Apr 4 17:53 test.php
First three letters are your permissions
Second three are your group
Third three are the public
r = read = 4
w = write = 2
x = execute = 1
0= no permission
1= execute only
2= write only DANGEROUS!
3= write and execute DANGEROUS!
4= read only
5= read/execute
6= read/write DANGEROUS!
7= read/write/execute DANGEROUS!
DANGEROUS NUMBERS: 2, 3, 6, 7
w in the public area is world writable and a huge security risk
6) Command to create password file for .htaccess
/usr/bin/htpasswd -c ~/pass ldelro02
7) Finished .htaccess for 301 redirect:
#the following disallows access to our file
<Files .htaccess>
order allow,deny
deny from all
</files>
#the following redirects users to a genetic error page for old page addresses
ErrorDocument 404 /~ldelro02/error-404.php
#root of visible web space (virtual path in this case)
Redirect 301 /~ldelro02/old/index.php
http://zephir.seattlecentral.edu/~ldelro02/new/index.php
* POP QUIZ # 7: 10/10 (100%)
*TEST # 4: 68/100 (100%)
Notes:
So, barely an improvement on Week 5 but when it comes to finishing the extra credit on Assignment number 5, I'm afraid to tell you that creating an error 404 page would be extremely difficult for me...
How can I create a custom 404 error page and link to a 'non-existent' web page in my Zephir web space? Where would I put it on my Zephir? I have to find some help so I can finish my extra credit for Assignment 5 before Monday because for me, I haven't got a clue. This is very challenging...
2 comments:
Leopaul,
After you wrote this, you did indeed get the custom error page to work.
Good job!
Bill
Leopaul,
After you wrote this blog post, you did indeed get the custom error page to work.
Good job!
Bill
Post a Comment