Quantcast
Channel: WJunction - Webmaster Forum - QuickRDP.com- Upto 60% on rdp plans for ...
Viewing all articles
Browse latest Browse all 15793

.htaccess use relative paths in errordocument

$
0
0
I have a folder I want to protect on my server where everything must be denied and redirected to another specific file
for my htaccess file I have
Code:

ErrorDocument 403 /notforyou.php
Deny From All

the problem with this is that it doesnt work with relative paths. If I have /privatedir as my folder I want to ban the internet from, I dont know any way in apache to use relative path and redirect the user to /privatedir/notforyou.php, its only possible to redirect to the /notforyou.php where ius placed in htdocs root

Does anyone know how I can get this to work my way or be able to somehow input the request directory variable. Like apache knows the request directory is /privatedir and I can put "ErrorDocument 403 variable/notforyou.php" in my htaccess instead somehow

I searched everywhere and I still cant find out how

Viewing all articles
Browse latest Browse all 15793

Trending Articles