LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-17-2005, 04:29 PM   #1
IlyaZ
Member
 
Registered: Apr 2004
Posts: 43

Rep: Reputation: 15
.htaccess -> Error 500


Hello fellas,

Im trying to create a .htaccess file that only accepts connections from a certain referer.
Code:
ErrorDocument 403 http://web-page.net
SetEnvIfNoCase Referer ^http://(<^/>*\.)?www.web-page\.net access_is_ok
SetEnvIfNoCase Referer ^http://(<^/>*\.)?web-page\.net access_is_ok
order deny,allow
deny from all
allow from env=access_is_ok
This only returns an Error 500 (Internal Server Error) when I try to access that page.

Am I supposed to change some "AllowOverride AuthConfig" parameters? If so which? Is the code right? Any other suggestions on why this doesn't work?

Thanks in advance,
IlyaZ
 
Old 06-18-2005, 09:17 AM   #2
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Your regexp is invalid. I don't know exactly what you want to do, but
^http://(<^/>*\.)?www.web-page\.net is not ok
 
Old 06-20-2005, 11:14 AM   #3
IlyaZ
Member
 
Registered: Apr 2004
Posts: 43

Original Poster
Rep: Reputation: 15
Ok, I skipped that line but the same problem persists.
 
Old 06-20-2005, 02:53 PM   #4
stefan_nicolau
Member
 
Registered: Jun 2005
Location: Canada
Distribution: Debian Etch/Sid, Ubuntu
Posts: 529

Rep: Reputation: 32
Quote:
Originally posted by IlyaZ
Ok, I skipped that line but the same problem persists.
The other line is also wrong.
Code:
^http://(<^/>*\.)?www.web-page\.net
^http://(<^/>*\.)?web-page\.net
are both wrong. If you're not sure how to build the correct regexp, have a look at kregexpeditor (comes with kde), or post what you want to match.

If you used the regexp ^http://(<\^/>*\.)?www\.web-page\.net , you would match:
http://www.web-page.net
http://<^/>>>>>.www.web-page.net

If all you want is www.web-page.net or web-page.net use
Code:
^http://www\.web-page\.net
^http://web-page\.net
or
^http://(www\.)?web-page\.net
If after fixing the regexps, it still gives an error 500, look at the error log

Last edited by stefan_nicolau; 06-20-2005 at 03:15 PM.
 
Old 06-20-2005, 03:43 PM   #5
IlyaZ
Member
 
Registered: Apr 2004
Posts: 43

Original Poster
Rep: Reputation: 15
Ok thank you. I still get the error but I'll look in the error log.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
frontpage 500 error I_AM Linux - General 1 07-26-2005 09:59 AM
Additionally, a 500 Internal Server Error error was encountered while trying to use a ukrainet Linux - General 10 06-24-2005 02:23 AM
PERL error 500 --- ronkymac Linux - Software 4 02-19-2005 07:05 AM
vqadmin error 500 papitu76 Linux - Software 1 01-17-2005 10:20 AM
ftp 500 error acid_kewpie Linux - Networking 0 10-07-2001 03:42 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration