URL和.htaccess [英] URL and .htaccess
问题描述
我已经使用.htaccess文件保护了一个目录。
我希望调度程序可以访问此目录中的某些文件
运行URL的
。问题是调度程序在此
目录中运行脚本,因此服务器会询问用户名和密码。如何避免这种情况???
我应该设置.htaccess文件以允许GET,但是如何???什么是
的URL ???
目录树:
admin
.htaccess
admin.htm // frame
adminmnu.htm //框内菜单
script1.php
script2.php
script3.php
我想从家里运行脚本,调度程序如下:
http://www.mysite.com/admin/script2....password=pass;
用户名和密码是.htaccess中提到的用户名和密码文件。
怎么办?
Bob
Bob Bedford< be ****** @ YouKnowWhatToDoHerehotmail.com>写道:我已经使用.htaccess文件保护了一个目录。
我希望调度程序可以访问此目录中的某些文件
运行URL。问题是调度程序在此目录中运行脚本,因此服务器会询问用户名和密码。如何避免这种???
我应该设置.htaccess文件以允许GET,但如何???什么是URL
目录树:
admin
.htaccess
admin.htm // frame
adminmnu.htm //框架中的菜单
script1.php
script2.php
script3.php
我想从中运行脚本家里有一个调度程序,如:
http://www.mysite.com/admin/script2....password=pass;
用户名和密码是.htaccess文件中提到的用户名和密码。 />
怎么做?
鲍勃
理论上:
http:// htuser:ht *** *@www.mysite.com /...& amp;密码=通过
可能工作 - 或不...取决于浏览器。
-
Simon Stienen< http://dangerouscat.net> < http://slashlife.de>
?你在这个世界上所做的事情是无关紧要的,
问题是,你能让人相信什么?你已经完成了。?
- 夏洛克·福尔摩斯在血色研究中作者:Arthur Conan Doyle
*** Bob Bedford写道/escribió(星期五,2004年9月24日17:32:51 +0200):我使用.htaccess文件保护了一个目录。
我想从家里运行脚本,调度程序如下:
http://www.mysite.com/admin/script2....password=pass;
用户名和密码是.htaccess文件中提出的用户名和密码。
如果您使用的是Apache mod_auth,则不能以这种方式传递auth数据;
数据必须包含在请求标头中。我可以想到两个选项:
*使用另一个auth系统来保护网站
*更改您的预定脚本,以便它可以提供HTTP身份验证数据
我通常使用后一种选择,但当然这取决于你的
脚本是什么样的。
-
- álvaroG。Vicario - 西班牙布尔戈斯
- 感谢您不通过电子邮件将我的问题发送给我
-
>理论上:http:// htuser:ht **** @ www.mysite.com/...&密码=通过
可能工作 - 或不...取决于浏览器。
已经尝试过,似乎不适用于IE6 ....无论如何,谢谢
干杯
I''ve protected a directory with an .htaccess file.
I''d like some of the files in this directory to be accessible by a scheduler
that runs an "URL". The problem is that the scheduler runs scripts in this
directory, so the server asks a username and password. How to avoid this ???
Should I set the .htaccess file to allow GET, but how ??? and what would be
the URL ???
directory tree:
admin
.htaccess
admin.htm //frame
adminmnu.htm //menu in frame
script1.php
script2.php
script3.php
I''d like to run the script from home with a scheduler like:
http://www.mysite.com/admin/script2....password=pass;
username and password being the ones asked in the .htaccess file.
How to do so ?
Bob
Bob Bedford <be******@YouKnowWhatToDoHerehotmail.com> wrote:I''ve protected a directory with an .htaccess file.
I''d like some of the files in this directory to be accessible by a scheduler
that runs an "URL". The problem is that the scheduler runs scripts in this
directory, so the server asks a username and password. How to avoid this ???
Should I set the .htaccess file to allow GET, but how ??? and what would be
the URL ???
directory tree:
admin
.htaccess
admin.htm //frame
adminmnu.htm //menu in frame
script1.php
script2.php
script3.php
I''d like to run the script from home with a scheduler like:
http://www.mysite.com/admin/script2....password=pass;
username and password being the ones asked in the .htaccess file.
How to do so ?
Bob
Theoretically:
http://htuser:ht****@www.mysite.com/...&password=pass
Might work - or not... depends on the browser.
--
Simon Stienen <http://dangerouscat.net> <http://slashlife.de>
?What you do in this world is a matter of no consequence,
The question is, what can you make people believe that you have done.?
-- Sherlock Holmes in "A Study in Scarlet" by Sir Arthur Conan Doyle
*** Bob Bedford wrote/escribió (Fri, 24 Sep 2004 17:32:51 +0200):I''ve protected a directory with an .htaccess file. I''d like to run the script from home with a scheduler like:
http://www.mysite.com/admin/script2....password=pass;
username and password being the ones asked in the .htaccess file.
You can''t pass auth data this way if you are using Apache mod_auth; the
data must go in the request headers. I can think of two options:
* Use another auth system to protect the site
* Change your scheduled script so it can provide HTTP auth data
I normally use the latter option but of course it depends on what your
script looks like.
--
-- álvaro G. Vicario - Burgos, Spain
-- Thank you for not e-mailing me your questions
--
> Theoretically:http://htuser:ht****@www.mysite.com/...&password=pass
Might work - or not... depends on the browser.
Already tried, seems not to work with IE6.... thanks anyway
Cheers
这篇关于URL和.htaccess的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!