Support » Fixing WordPress » Redirect my site

  • I have a sub-site I manage, I need to figure out how to allow access from only one wordpress page and not direct or from any other site. Can someone please assist, I have been trying this for a few weeks and I’m not getting good results.

    I want to allow access from www, to but from nowhere else.

    Again assistance would be very much appreciated.

    Rodney Smith

Viewing 1 replies (of 1 total)
  • I don’t know very well your problem.

    If you want block direct access to theme php files. You can put this code in the initiation of your php theme file:

    if( ! defined( 'ABSPATH' ) ) die( 'Forbidden for direct access.' );

    If you want block visit outside of your domain, you can treat the $_SERVER['HTTP_REFERER'].

Viewing 1 replies (of 1 total)
  • The topic ‘Redirect my site’ is closed to new replies.