| |||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | #1 (permalink) |
| Web Marketing Specialist | .htaccess authentication How would i go about makeing a directory avaliable only to the people how got to it from a certain url? For example: The only way a user could get to www.example.com/directory is if they came from www.example.com/login.php. login.php would be the verification script in php and all the .htaccess would do it prevent someone from just going to the folder by typing in the url Thanks! |
| |
| | #5 (permalink) |
| Professional Monkey | in .htaccess use RewriteEngine On RewriteCond %{HTTP_REFERER} !^http://www.example.com/login.php$ RewriteRule ^.*$ - [NC,L] if you wanted it to work exactly as you have described you would use RewriteEngine On RewriteCond %{THE_REQUEST} directory RewriteCond %{HTTP_REFERER} !^http://www.example.com/login.php$ RewriteRule ^.*$ - [NC,L]
__________________ [http://www.webmasterwords.com/python-split-and-join-examples]Python Tutorials[/url] |
| |
| | #7 (permalink) |
| Senior Member | Why don't you just use .htaccess and .htpasswd to gain access to the folder
__________________ You got no time for the messenger, got no regard for the thing that you don't understand, you got no fear of the underdog, that's why you will not survive! |
| |
| | #11 (permalink) | |
| Senior Member | Quote:
__________________ You got no time for the messenger, got no regard for the thing that you don't understand, you got no fear of the underdog, that's why you will not survive! | |
| |
| | #12 (permalink) | |
| NamePros Regular | Quote:
PHP Code: PHP Code: PHP Code: | |
| |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SEO with mod_rewrite and .htaccess | cDizzle | CODE | 1 | 01-08-2006 01:50 AM |
| $15 for a .htaccess file - Precise criteria required | mholt | Web Development Wanted | 1 | 11-06-2005 09:16 PM |
| Using mod_rewrite and a .htaccess to do some redirection... 25 NP$ REWARD | mholt | Programming | 0 | 09-21-2005 02:15 PM |
| .htaccess + Domain Parking | wistow | Programming | 15 | 07-04-2005 08:46 AM |
| .htaccess | D@Z | Web Design Discussion | 5 | 04-27-2005 08:27 PM |