<div dir="ltr"><br><div class="gmail_quote">On Fri, Mar 4, 2011 at 21:55, Geoff Shang <span dir="ltr"><<a href="mailto:geoff@quitelikely.com">geoff@quitelikely.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Fri, 4 Mar 2011, Uri Even-Chen wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
OK, I setup file /etc/apache2/sites-available/default , but it's still<br>
not working. I can't log into /admin , and<br>
<a href="http://www.speedy2000.net/uri/en" target="_blank">http://www.speedy2000.net/uri/en</a> is "Not Found / The requested URL<br>
/uri/en was not found on this server.". I used<br>
<a href="http://www.htmlite.com/HTA006a.php" target="_blank">http://www.htmlite.com/HTA006a.php</a> to create admin password (without<br>
salt), what is the problem? And why does<br>
<a href="http://www.speedy2000.net/uri/en" target="_blank">http://www.speedy2000.net/uri/en</a> not redirect to<br>
<a href="http://www.speedy2000.net/uri/" target="_blank">http://www.speedy2000.net/uri/</a> ? here are the contents of<br>
/etc/apache2/sites-available/default :<br>
</blockquote>
<br></div>
I'll be the first to admit I'm not big on this stuff, particularly regular expressions, but I didn't see anything whhich would catch /uri/en<div class="im"><br></div></blockquote><div><br></div><div>I want to catch any URL that starts with /uri/ or /composer/ , for example /uri/en or /uri/blog or anything more specific (for example "<a href="http://www.speedy2000.net/uri/blog/2011/02/facebook-hacker-cup-2/">http://www.speedy2000.net/uri/blog/2011/02/facebook-hacker-cup-2/</a>"). The PHP file redirects the URL to another domain:</div>
<div><br></div><div><div><?php</div><div>header('Location: <a href="http://www.speedysoft.net">http://www.speedysoft.net</a>' . $_SERVER['REQUEST_URI']);</div><div>?></div></div><div> </div><div>(currently it's not working. only /uri/ and /composer/ are redirected).</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<Directory /var/www/admin/><br>
AuthUserFile /etc/apache2/users/.htpasswd<br>
AuthGroupFile /dev/null<br>
</blockquote>
<br></div>
I'd think it just better not to specify AuthGroupFile at all, rather than use /dev/null. I've never had occasion to use it.<div class="im"><br></div></blockquote><div>Maybe. but it works with "AuthGroupFile /dev/null" as well.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
AuthName "Protected Area"<br>
AuthType Basic<br>
<br>
<LIMIT GET POST><br>
require admin<br>
</LIMIT><br>
</blockquote>
<br></div>
As you later posted, the require line is not correct here. If you want to be able to support multiple usernames/passwords, you may want to use:<br>
<br>
require valid-user<br>
<br>
instead.<br><font color="#888888">
<br>
Geoff.</font><div><div></div><div class="h5"><br></div></div></blockquote><div><br></div></div><div><div>Uri Even-Chen</div><div>Mobile Phone: +972-50-9007559</div><div>E-mail: <a href="mailto:uri@speedy.net" target="_blank">uri@speedy.net</a></div>
<div>Website: <a href="http://www.speedy.net/" target="_blank">http://www.speedy.net/</a></div><div><br></div></div></div>