techker Posted January 14, 2007 Share Posted January 14, 2007 hey guys my login systeme does not have a htaccess file in a directory that i need it the most..is there a way to make a htaccess file to redirect twards the login.php file?i guess it wold need to have a access to the login systeme files??? Quote Link to comment Share on other sites More sharing options...
apacheguy Posted January 15, 2007 Share Posted January 15, 2007 So you want to make the htaccess file redirect people who access the directory to login.php? Why wouldn't you just make login.php the index file for that directory? Quote Link to comment Share on other sites More sharing options...
techker Posted January 15, 2007 Author Share Posted January 15, 2007 well i have lots of directorys.that is why a htaccess would be better and the site is all done so it would be long to redo to incorporate the login script.. Quote Link to comment Share on other sites More sharing options...
steviewdr Posted January 15, 2007 Share Posted January 15, 2007 Put this in a .htaccess file:DirectoryIndex login.php-steve Quote Link to comment Share on other sites More sharing options...
techker Posted January 15, 2007 Author Share Posted January 15, 2007 so i do this?DirectoryIndex login.phpErrorDocument 403 http://www.site.ca/forbidden.php Quote Link to comment Share on other sites More sharing options...
techker Posted January 15, 2007 Author Share Posted January 15, 2007 perfect thx buddyhow does this work?i did but i can't explain it? Quote Link to comment Share on other sites More sharing options...
steviewdr Posted January 16, 2007 Share Posted January 16, 2007 The default apache setting has:DirectoryIndex index.html index.cgi index.pl index.php index.xhtmlWhen you install php you have to add index.php to the above list also.The word DirectoryIndex - means index or home page (or the first page to be looked for in a directory). So basically with the htaccess file you are overriding the default and saying that the DirectoryIndex is login.php.-steve Quote Link to comment Share on other sites More sharing options...
techker Posted January 16, 2007 Author Share Posted January 16, 2007 thx buddy Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.