由买买提看人间百态

topics

全部话题 - 话题: htaccess
首页 上页 1 2 (共2页)
c***c
发帖数: 21374
1
来自主题: BuildingWeb版 - 各位webadmin
尽量少用htaccess,多用httpd

c***c
发帖数: 21374
2
no
对于web服务器没影响,原来怎么样还是怎么样,主要是搜索引擎优化
除非采用纯静态html文件或者缓等技术,否则这种伪html对于降低服务器负担没有
任何的帮助。恰恰相反,反而可能增加web服务器的负荷,特别如果都是通过htaccess
而不是httpd.conf设置的话(这里以apache为例)
j*****o
发帖数: 320
3
来自主题: BuildingWeb版 - error in connecting PHP with MySQL
This is PHP5 only. Maybe your host supports PHP4 by default? If so, you
may need a htaccess file to enable PHP5.

Hello all,
I am new to PHP and MySQL programming, and I am trying to connect to MySQL
via my PHP script. My PHP scripts generally work. However, for the following
PHP code:
ini_set('display_errors', true);
error_reporting(E_ALL);
$mysqli = mysqli_connect("localhost", "xxx", "xxx", "test");
...................
?>
I get the following error message:
Fatal error: Call to undefined
g****n
发帖数: 3370
4
来自主题: BuildingWeb版 - 请教一个简单的DNS问题
在服务器端的.htaccess中加几句就能解决这个问题。

hosting
l*******9
发帖数: 177
5
有多少空间能提供这样的自由度, ssh+mysql+apache+perl
需要至少 .htaccess, crontab, cvs, sftp, rsync, gcc
make,自己安装 modules(其实就是ssh) $6左右 一个月。
。。:-)
e******x
发帖数: 925
6
没有用过。不过我想应该是在 .htaccess文件里处理
加上:
AddType
AddHandler
让服务器把图片按脚本处理,在脚本中返回一个图片就可以了。
l******g
发帖数: 11
7
各位同学,我的网站 Ubuntu/Apache2 要开一个mobile界面。我怎么样
让mobile browser重定向到我的.mobi域名去? 我写了一个跳转
index.xhtml。好像没有什么用? 是不是还要配置.htaccess? 大家谁
的网站支持mobile browser的,告诉我一下? 谢谢!
b********5
发帖数: 12
8
来自主题: BuildingWeb版 - 怎么写这个htaccess
Redirect /bbbb/asdfwewes/d http://cc.net/asdfwewes/d
OR
RedirectMatch ^/bbbb/asdfwewes/d/? http://cc.net/asdfwewes/d
n*******e
发帖数: 55
9
用APACHE HTACCESS在控制用户登陆。谢谢
N**********d
发帖数: 9292
10
来自主题: BuildingWeb版 - about .htaccess
On a server, I have a directory /path/to/my/userId
I have a web directory like /path/to/my/userId/public_html
I can access the index like http://web.domain.edu/~userId/index.html
if I want to install wordpress or something the like into
/path/to/my/userId/public_html/wordpress
is it possible to access the wordpress pages without type the folder
name wordpress in the url?
Any help will be appriciated!
h******y
发帖数: 173
11
来自主题: BuildingWeb版 - about .htaccess
只能做网页跳转吧,从index.html跳到wordpress。如果你能改
服务器的设置,那就没问题了。
N**********d
发帖数: 9292
12
来自主题: BuildingWeb版 - about .htaccess
thanks
I will read more on that
e******x
发帖数: 925
13
你把图片链接到你自己的服务器的一个计数页面里
如: http://www.yoursite.com/yourimage.php?img=imagefilename>
如果你想知道哪个特定的email看了,可以这样
http://www.yoursite.com/yourimage.php?img=imagefilename&id=emailid>
你还可以用.htaccess对连接进行改写
如:
http://www.yoursite.com/yourimage/emailid-imagefilename.gif>
s****y
发帖数: 983
14
1, disable 掉 js 在邮件客户端的运行, 那样ajax就失效了, 我想大多数email
client都有相关的安全设置吧。
2,url rewrite 静态请求到controller(可以利用apache 的 .htaccess),在
controller return response 之前或者更新数据库或者发email随你啦
3, 客户向服务器发出请求默认都会在服务器留下log, 你可以用cron job监听log中是
否有该图片的请求,这个就不用编啥程了
4,有些email client有开放的add-on, 这样你有可能写一些add-on然后与email交互取
得本体设置,也许可行...不太确定...hohoho
e******x
发帖数: 925
15
你可以用 .htaccess 做 URL转移
也可以用 parked domain

htm
么?
s******5
发帖数: 32
16
镜像要被GOOGLE砍的
.htaccess 做跳转吧
RewriteEngine on
rewritecond %{http_host} ^111.com [nc]
rewriterule ^(.*)$ http://222.com/$1 [r=301,nc]
或者你HOST后台有跳转设置的话,在那设置下就可以
A*******i
发帖数: 31
17
来自主题: BuildingWeb版 - Hostmonster中文乱码问题
大家好。我用hostmonster买了空间和域名建了自己的网站,没有购买独立IP(dedicate
d IP)。
英文网页可以显示,中文网页是乱码,大家知道怎么弄吗?
在HTML语句里面,我已经强行将coding从ISO-8859-1改成UF-8或者GB2312,可是中文还
是乱码。
在用网站http://validator.w3.org/detailed.html验证我的网页html语言的时候,总是
用ISO-8859-1编码,完全不理会我在HTML语句的命令。
我的目录下有个.htaccess文件,
我改了
AddDefaultCharset GB2312
DefaultLanguage zh-cn
AddDefaultCharset none
AddDefaultCharset Off
AddLanguage zh-cn .cn
AddCharset gb2312 .html
AddCharset gb2312 .htm
IndexOptions Charset=GB2312
都没有用,请问有谁在hostmonster遇到类似的问题,怎么解决的?
c***c
发帖数: 21374
18
来自主题: BuildingWeb版 - Hostmonster中文乱码问题
htaccess只有在httpd.conf中allowoverride设置为允许的时候才有用
A*******i
发帖数: 31
19
来自主题: BuildingWeb版 - Hostmonster中文乱码问题
httpd.conf文件在哪里呢?是不是没有dedicate IP的用户没有权限修改这个文件?
我刚刚发现了一个方法,我删除了.htaccess文件;
在html文件里面写上了UTF-8编码;
结果是用Windows IE可以显示中文;
用Fireforx显示是乱码。
请问这个是怎么回事?
s****y
发帖数: 983
20
来自主题: BuildingWeb版 - 请教:一直不明白这个怎么实现
htaccess密码保护的是相关网页,而不是源码,经过web服务器的处理,用户得到的是
源码生成的html代码,除了漏洞,根本看不到后台配置。
我想做一个实例你就明白了
S**********s
发帖数: 2033
21
来自主题: BuildingWeb版 - 请教:一直不明白这个怎么实现
哈,应该的,很占用你的时间和精力。
不过我好笨,我还是没搞清楚。
比方说web surfer要查一个房间信息,我这边相对应的文件是rooms.php,保存在query
目录里,就是query/rooms.php了。rooms.php里include了 ../includes/dbconnection
.php, 在dbconnection.php里有db用户密码信息。我用htaccess把includes这个目录保
护起来,这样的结果是web surfer就不能得到相关信息了。
Or did I miss something? Thank you!
s****y
发帖数: 983
22
来自主题: BuildingWeb版 - 请教:一直不明白这个怎么实现
include路径一般是在web document之外的,如果不在外面,一般是用htaccess保护起
来,但即使不保护,用户也是看不到你的db配置的(web server的报错除外),举个例
子吧,最简单的数据库连接例子(google来的):
u**y
发帖数: 202
23
来自主题: BuildingWeb版 - 请教:一直不明白这个怎么实现
我觉得LZ把连接数据库的username and pwd和通过网站访问数据的username and pwd搞
混了。
就像上面sunrey大侠所说:
include路径一般是在web document之外的,如果不在外面,一般是用htaccess保护起
来,但即使不保护,用户也是看不到你的db配置的(web server的报错除外)
而用户和管理员通过网站登陆读取数据的username and pwd的信息是储存在database
某个table里面的
所以用户登陆网站的username and pwd和连接数据库的username and pwd是完全两件事
情。
不知道这么会大lz问题对不对。
S**********s
发帖数: 2033
24
来自主题: BuildingWeb版 - 请教:一直不明白这个怎么实现
多谢大家,在你们的提示下,我实验了一下,一个不被htacess保护的网页A,如果网页
A包含被htaccess保护的网页B,外界可以正常访问网页A。我原来以为网页A因为包含了
网页B,也需要密码才能被访问到。
还有,好像我看见有人没有密码的情况下下载过某个网页的php source code.
g******y
发帖数: 21
25
来自主题: BuildingWeb版 - 怎么debug urlrewrite的rule
That depends on how you do it.
1. httpd.conf level
2 .htaccess level
3. webpage level
a) html redirect
b) java redicret
c) php redirect
v****s
发帖数: 1112
26
。。。。
dw是用来design的,你这个需要server支持的,用htaccess
r****r
发帖数: 1839
27
具体的记不清了,Google htpassword htaccess
y******6
发帖数: 650
28
晕,这个根本不需要什么语言来写,服务器本身就支持这样的功能。如果是apache的话
就用.htaccess来控制,IIS的话把目录的匿名权限取消,然后添加用户权限。
f******t
发帖数: 134
29
来自主题: BuildingWeb版 - 终于把magento 装好了.
刚刚买了一个 self managed 的 vps. 512 的 ram 20 美元还不错. 老婆不上班, 在
家里在ebay 上卖东西. ebay收费太贵了, 想让我帮她做个网站, 自己卖.
这些天尝试着安装了一个magento 的网店. 终于搞好了.
自己装了 ubuntu 的 server edition 10.0.4 LTS 版.
放弃了 apache, 用 nginx 0.85. nginx 就是快,不过相关的教程很少, 搞了好一阵才
搞好. 安装了 最新的 php, mysql 和 php-fpm.
安装之后唯一遇到的麻烦就是 URL rewrite, apache 用的 是 .htaccess, nginx 用
的自己的一套 rewrite, 花了一个多小时也搞定了.
http://shop.codeinventory.com/
现在用这个临时的域名先测试一下. 过些天准备买个ssl装上去,在买个新域名 就基本
搞定了.
有搞magento 的,大家交流一下. 我才刚刚开始研究这个,不到一个星期.
r********t
发帖数: 395
30
by default, any user can browse the files/pages in apache web server.
I wanna disable it now. I have tried changing the tag in
configuration file, without success.
Now I wanna change the .htaccess file, but I simply can't find it. Can
anyone help?
M*********t
发帖数: 257
31
来自主题: BuildingWeb版 - Apache2 on linux mod_rewrite question
Any of you guys familiar with mod_rewrite in Apache2 ?
I created a .htaccess file under my home dir /home/john/public_html/
and try to redirect all incoming URL to http://localhost/~john/index.php?page=xxx
but when I try to access a link like http://localhost/~john/register
I got a 404 page not found error
Server says the following URL is not found
/home/john/public_html/index.php
It seems Apache map the requested URL to physical file location
but the file is actually there in that path
and if ... 阅读全帖
s*****l
发帖数: 2041
32
来自主题: BuildingWeb版 - 如何制作好的404出错页面
在.htaccess加入出错页面比较容易,
但是怎样才能自动记录出错的链接?
例如某个网游输入了一个错误的链接,转到404页面的同时,怎样才能把这个错误的链
接也记录下来?
有没有哪位童鞋给点建议?
d******8
发帖数: 2191
33
hostgator的客服说网站好多redirect,造成server延迟好多。第一次看htaccess文件
,能给提供些修改建议吗?谢谢!
# RewriteEngine on
# RewriteCond %{HTTP_HOST} ^(www.)?nymovein.com$
# RewriteCond %{REQUEST_URI} !^/nymovein/
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^(.*)$ /nymovein/$1
# RewriteCond %{HTTP_HOST} ^(www.)?nymovein.com$
# RewriteRule ^(/)?$ nymovein/index.php [L]
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# Add trailing slash if path does not contain a period or end ... 阅读全帖
g****z
发帖数: 1135
34
是指浏览者不能访问么?如果是Apache, 设置mod_rewrite并在此目录下写入.
htaccess.
RewriteCond %{REQUEST_URI} .*\.(php|html)
RewriteRule ^(.*)$ [R=404,L]
或者这个更简单:
RedirectMatch 404 .*\.(php|html)
试试。
d*****9
发帖数: 46
35
多谢! 看别的帖子有说, 要把index和htaccess 两个文件放到根目录下, 不知道靠
谱不?晚上再试试, 谢谢回复啊!

n
g****z
发帖数: 1135
36
嗯,照此设置后再把index和.htaccess 放到 /var/www/wordpress下.
E***e
发帖数: 3430
37
来自主题: Hardware版 - Ubuntu NAS简单方案
装owncloud:
https://software.opensuse.org/download/package?project=isv:ownCloud:
community&package=owncloud
找ubuntu 14.04部分
要么用默认存储路径,要么自己定义一个文件夹
如果想用/user/defined/path/to/owncloud/,就要建立到to,不要建立owncloud,然
后把to的owner设置给www-data
通过http://localhost/owncloud/首次访问oc,建立账户
突破513MB上传限制改:
"/var/www/owncloud/.htaccess" 里面的 "php_value upload_max_filesize" "php_
value post_max_size"
添加访问domain改"/var/www/owncloud/config/config.php" 里加入 "1 => 'local.ip
.example'," "2 => 'your.dns.example',"
oc新版本很不稳定,经常挂,挂了用命令... 阅读全帖
E***e
发帖数: 3430
38
来自主题: Hardware版 - Ubuntu NAS简单方案
装owncloud:
https://software.opensuse.org/download/package?project=isv:ownCloud:
community&package=owncloud
找ubuntu 14.04部分
要么用默认存储路径,要么自己定义一个文件夹
如果想用/user/defined/path/to/owncloud/,就要建立到to,不要建立owncloud,然
后把to的owner设置给www-data
通过http://localhost/owncloud/首次访问oc,建立账户
突破513MB上传限制改:
"/var/www/owncloud/.htaccess" 里面的 "php_value upload_max_filesize" "php_
value post_max_size"
添加访问domain改"/var/www/owncloud/config/config.php" 里加入 "1 => 'local.ip
.example'," "2 => 'your.dns.example',"
oc新版本很不稳定,经常挂
准备搞一个... 阅读全帖
b*k
发帖数: 27
39
来自主题: Internet版 - Re: 问个土的
you can set it by your self, check htpasswd
.htaccess
y****i
发帖数: 5690
40
来自主题: Internet版 - [转载] htpasswd
【 以下文字转载自 Security 讨论区 】
【 原文由 yongqi 所发表 】
using .htaccess and .htpasswd for protected www directory. It will prompt for
username and passwd once and the next time enters it, it will not ask for
username/pass again.
Delete files/cookies/cache doesn't help. How can I make it ask for
username/passwd every time that directory is accessed?
Thanks!
k*****l
发帖数: 34
41
.htaccess 中设置么?如何设置?
3x
S*A
发帖数: 7142
42
来自主题: Linux版 - 问个弱问题
这种似乎 .htaccess 可以解决了吧。
搞成不能 browse file 的就可以了。
l***y
发帖数: 4671
43
【 以下文字转载自 Thoughts 讨论区 】
发信人: lummy (河马·云何), 信区: Thoughts
标 题: 撞墙。。。装 drupal 中
发信站: BBS 未名空间站 (Tue Dec 20 23:26:12 2011, 美东)
设了个 WAMP,装 drupal 时,为啥每次地址栏都自动变成: http://my.web.site/install.php
然后内容是 install.php 的内容涅?貌似 index.php 被执行了,但 install.php 出问题了?为啥 drupal 的安装界面不出现涅?。。。
在 httpd.conf 里俺设了:

DirectoryIndex index.html index.php

在 .htaccess 里是 drupal 自己设的
# Set the default handler.
DirectoryIndex index.php index.html index.htm
版本是:drupal 7.10, apache 2.2, php... 阅读全帖
X****r
发帖数: 3557
44
来自主题: Programming版 - 怎么为link设密码?
You cannot access-control on a link in a meanful way.
You can access-control the resource it linked to if
it is on a server you control, e.g. by using .htaccess
file. Google it for more detials.
j***y
发帖数: 87
45
in httpd.conf
AccessFileName .htaccess

AllowOverride All
and in the directory you want to protect:
.htaccss and .htpasswd
y****i
发帖数: 5690
46
来自主题: Security版 - htpasswd
using .htaccess and .htpasswd for protected www directory. It will prompt for
username and passwd once and the next time enters it, it will not ask for
username/pass again.
Delete files/cookies/cache doesn't help. How can I make it ask for
username/passwd every time that directory is accessed?
Thanks!
j*****t
发帖数: 86
47
来自主题: Security版 - 遭遇骇客,请大家指教
joomla 不及时升级,会有很多安全漏洞的。
一个简单办法是在你的administrator 目录再加一个.htaccess 和 .htpasswd, 用第二
层密码保护administrator目录不被黑客访问。
a**y
发帖数: 6501
48
if your web server is APACHE,
add a few lines to the .htaccess file in the directory like
IndexOptions DescriptionWidth=*
AddDescription "Description for 1.html" 1.html
A*******i
发帖数: 31
49
大家好。我用hostmonster买了空间和域名建了自己的网站,没有购买独立IP(dedicate
d IP)。
英文网页可以显示,中文网页是乱码,大家知道怎么弄吗?
在HTML语句里面,我已经强行将coding从ISO-8859-1改成UF-8或者GB2312,可是中文还
是乱码。
在用网站http://validator.w3.org/detailed.html验证我的网页html语言的时候,总是
用ISO-8859-1编码,完全不理会我在HTML语句的命令。
我的目录下有个.htaccess文件,
我改了
AddDefaultCharset GB2312
DefaultLanguage zh-cn
AddDefaultCharset none
AddDefaultCharset Off
AddLanguage zh-cn .cn
AddCharset gb2312 .html
AddCharset gb2312 .htm
IndexOptions Charset=GB2312
都没有用,请问有谁在hostmonster遇到类似的问题,怎么解决的?
d*******o
发帖数: 493
50
来自主题: Statistics版 - 收集面试题目
How to use AB testing
What is Accenture digital diagnostics
How to use account query (export API)
What is accounts
How to use AdSense linking to
What is AdWords linking to
How to use Google
What is Google Analytics
How to use initial configuration
What is multiple
How to use profiles and
... 阅读全帖
首页 上页 1 2 (共2页)