Disable visit to page by direct link .htaccess file -



Disable visit to page by direct link .htaccess file -

i want visitors not able go page http://test.com/test.php when typ in browser. next code help me in .htaccess file:

<files .test.php> order allow,deny deny </files>

however, want users able visit page when click on button on different page on website redirecting them http://test.com/test.php. can help me out this?

you need to rely on http_referer this. place in root .htaccess:

rewriteengine on rewritecond %{http_referer} !^https?://(www\.)?domain\.com [nc] rewriterule test\.php$ - [f,nc]

change domain.com actual domain.

.htaccess

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -