Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Redirect Pages

  1. #1
    QHF's Avatar
    QHF
    QHF is offline Nearly a Master Glow Jedi
    Join Date
    Jun 2007
    Location
    Wisconsin
    Posts
    131

    Post Redirect Pages

    I have been directed to temorarally make our website unavailable to the public due to corporate reoganization. I created a redirect page and setup the redirect in cPanel, it's working. The issue now is how to prevent site visitors from bypassing the redirect page if they manually type in a specific URL to our site. I tried going to our site and the redirect page comes up fine, but if I type in www.ourdomain.org/contact.html, I can still access the contact page and from there the entire site is available via the menu buttons.

    Is there a way, to redirect the whole site to the redirect page short of creating redirects for every page? How do you prevent visitors from using a specific URL to bypass the redirected homepage or to access pages from bookmarks?

    Thanks!

    QHF

  2. #2
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,250

    Default

    The easiest way to do it would be to use .htaccess at the public_html level.

    You could either "deny from *" which will give a "forbidden" message to anyone that tries to visit the site.

    Or, you could password protect public_html using cPanel would be another way to do it.

    In either case, anything lower than public_html will follow the rules of the highest level .htaccess file.

    You could also simply chmod 000 public_html which would do basically the same thing as a deny from all in .htaccess.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

  3. #3
    QHF's Avatar
    QHF
    QHF is offline Nearly a Master Glow Jedi
    Join Date
    Jun 2007
    Location
    Wisconsin
    Posts
    131

    Default

    Mat,

    Your got me thinking...hmmm

    Quote Originally Posted by Matt View Post
    The easiest way to do it would be to use .htaccess at the public_html level.

    You could either "deny from *" which will give a "forbidden" message to anyone that tries to visit the site..
    Dosen't this defeat the purpose of a redirect page? I want the visitor to see the information on the redirect page.

    Quote Originally Posted by Matt View Post
    Or, you could password protect public_html using cPanel would be another way to do it..
    What would a site visitor see if public_html is password protected, a "forbidden" message or a "your are not authorized" type of message. This senario also doesn't look like it will show a visitor the information on the redirect page.

    Quote Originally Posted by Matt View Post
    You could also simply chmod 000 public_html which would do basically the same thing as a deny from all in .htaccess..
    Correct me if I'm thinking cap is on backwards, but what would happen if I go to public_html chmod not public_html itself but the all contents of public_html to 000 with the exception index.html and the redirect page linked to index.html, won't the redirect page be the only one available?

    QHF

  4. #4
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,250

    Default

    My suggestions were for a complete disabling of the site. If you want to show an index page only, and not allow access to every other page, you can still do it with .htaccess, but its not as simple. You can of course delete all the files if you wanted then just slap an index page up there which would avoid the need for redirection and .htaccess rules then upload the site later when the company has done their thing...

    Quote Originally Posted by QHF View Post
    Correct me if I'm thinking cap is on backwards, but what would happen if I go to public_html chmod not public_html itself but the all contents of public_html to 000 with the exception index.html and the redirect page linked to index.html, won't the redirect page be the only one available?
    This would work, and there is no need for a redirect as long as your index page is the new one.
    Last edited by Matt; 01-24-2008 at 03:14 PM.
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

  5. #5
    QHF's Avatar
    QHF
    QHF is offline Nearly a Master Glow Jedi
    Join Date
    Jun 2007
    Location
    Wisconsin
    Posts
    131

    Default

    Everything is working correctly now. Thanks for the advise.

    QHF

  6. #6
    andychev's Avatar
    andychev is offline Master Glow Jedi
    Join Date
    Apr 2005
    Location
    Chester, UK
    Posts
    150

    Default

    Another sugestion for the mixing pot..... (i know you have already resolved this)

    Rename the public_html folder to say public_html_old then create a new, empty public_html folder. Copy the index.html across and bobs your uncle. The old website would then be below the public_html folder making it inaccesible to the public and its structue and permisions would remain intact.

  7. #7
    QHF's Avatar
    QHF
    QHF is offline Nearly a Master Glow Jedi
    Join Date
    Jun 2007
    Location
    Wisconsin
    Posts
    131

    Default

    Quote Originally Posted by andychev View Post
    Another suggestion for the mixing pot..... (i know you have already resolved this)

    Rename the public_html folder to say public_html_old then create a new, empty public_html folder. Copy the index.html across and bobs your uncle.
    Andyhev,
    Your solution is a lot more elegant than mine is. I think I'll go back and implement it. It will make re-opening the site so much easer, at that point all I have to to is delete the newly created public_html folder with the temp index page and rename public_html_old back, and as you say, everything should be as it was. Thanks for the tip!
    By the way, how did you know bobs my uncle?

    QHF

  8. #8
    Matt's Avatar
    Matt is offline GlowHost Administrator
    Join Date
    Jan 2005
    Location
    Behind your monitor
    Posts
    5,250

    Default

    What the heck is a bobs my uncle?!?
    Send your friends and site visitors to GlowHost and get $125 plus bonus!
    GlowHost Affiliate Program | Read our Blog | GlowHost's Facebook | Follow us on Twitter | GlowHost on Google+

  9. #9
    QHF's Avatar
    QHF
    QHF is offline Nearly a Master Glow Jedi
    Join Date
    Jun 2007
    Location
    Wisconsin
    Posts
    131

    Default

    Quote Originally Posted by Matt View Post
    What the heck is a bobs my uncle?!?
    Mat,
    Bob's your uncle from Andychev reply to my post I beleive is a well used British phrase. It is added to the end of sentences a bit like and that's it! Andychev, is this correct?

    QHF

  10. #10
    andychev's Avatar
    andychev is offline Master Glow Jedi
    Join Date
    Apr 2005
    Location
    Chester, UK
    Posts
    150

    Default

    He he i havent laughed so much for ages! QHF is right, is is a very well known phrase over here put on the end of a sentence to say 'and thats it', have a look at World Wide Words: Bob’s your uncle. 'Fanny's your aunt' is used in exactly the same way. Put them both together one after the other, bobs your uncle and fanny's your aunt for twice the effect.


Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16