JakeTheSnake3.0 Posted June 20, 2009 Share Posted June 20, 2009 Hello everyone. I've been trying to stop my site from redirecting when I attempt to log into any folder within the "ftp" folder. URL example: http://mydomain.com/ftp/private/ or http://mydomain.com/ftp/public/ With what I have set up now, it always attempts to redirect to http://www.mydomain.com/ftp/private/ or http://www.mydomain.com/ftp/public/ and I end up getting a Forbidden reply. This is what I have.... RewriteCond %{HTTP_HOST} ^mydomain\.com [NC] RewriteCond %{REQUEST_URI} !/ftp/(.*) [NC] RewriteRule (.*) http://www\.mydomain\.com/$1 [R=301,NC] If I were to take out all three of those lines altogether, the login works just fine. Any thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/163039-htaccess-rewritecond-not-being-applied/ Share on other sites More sharing options...
JakeTheSnake3.0 Posted June 25, 2009 Author Share Posted June 25, 2009 Update: I've narrowed down the problem to this: I get permanently redirected to 401 error on password protected directories. So for example, I can access http://mydomain.com/ftp/public/ but not http://mydomain.com/ftp/private/ Quote Link to comment https://forums.phpfreaks.com/topic/163039-htaccess-rewritecond-not-being-applied/#findComment-863789 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.