PDA

View Full Version : hỏi về htaccess



khucthuydu
29-06-2005, 08:10
Đây là file mình lấy từ 4u.jcisio.com lẽ ra nên vào hỏi chủ nhân tiếc là ko online được nên hỏi ở đây mong các bạn giúp


order allow,deny
allow from all
#order deny,allow
#deny from all
#allow from 127.0.0.1
#allow from 172.16.24.242
#allow from 192.44.76.8
#allow from 192.108.115.2

DirectoryIndex index.php index.html index.htm ny.php /data/error/000.shtml
Options Indexes FollowSymLinks MultiViews ExecCGI
AddDefaultCharset utf-8
#AddDefaultCharset iso-8859-1

ErrorDocument 401 /data/error/401.html
ErrorDocument 403 /data/error/403.html
ErrorDocument 404 /data/error/404.html
ErrorDocument 405 /data/error/405.html
ErrorDocument 500 /data/error/500.html

RewriteEngine on

RewriteCond %{HTTP_HOST} ^jcisio.com [OR]
RewriteCond %{HTTP_HOST} ^www.jcisio.com
RewriteRule (.*) http://4u.jcisio.com/$1 [R=301,L]

RewriteRule ^x/photo([0-9]*).jpg$ /p/a/?a=see&id=$1
RewriteRule ^x/photo([0-9]*).htm$ /p/a/?a=view&id=$1 [R]
RewriteRule ^x/album([0-9]*).htm$ /p/a/?c=$1 [R]
RewriteRule ^x/topic([0-9]*).htm$ /p/k/?t=$1 [R]
RewriteRule ^x/article([0-9]*).htm$ /p/k/?pt=$1 [R]

RewriteRule ^x/topic-([0-9]*).html$ /p/k/?t=$1 [R]
RewriteRule ^x/article-([0-9]*).html$ /p/k/?pt=$1 [R]
RewriteRule ^x/story-([0-9]*).html$ /p/l/?sc=5&pt=$1 [R]
RewriteRule ^x/poem-([0-9]*).html$ /p/l/?sc=4&pt=$1 [R]
RewriteRule ^x/song-([0-9]*).html$ /p/m/?a=lyric&sg=$1 [R]
RewriteRule ^x/thread-([0-9]*).html$ /p/b/?t=$1 [R]

RewriteRule ^forum.htm$ /p/b/ [R]
RewriteRule ^(info|knowledge|relax|service|about).htm$ /?m=show&file=$1
RewriteRule ^page/([a-z0-9]+).htm$ /?m=show&file=$1
RewriteRule ^mod/([a-z0-9]+).htm(/)*([0-9]*)$ /?m=$1&s=$3

RewriteRule ^p/(admin|mod)/(.*)$ /?z=$1&$2 [QSA]
RewriteRule ^p/(.)/(.*)$ /?z=$1&$2 [QSA]
RewriteRule ^s/(.*)$ /service/$1 [QSA]

RewriteRule ^ltv.htm$ /p/b/?f=54 [R]



Trong này có một số phần ko hiểu có bạn bạn giúp giải thích ko
* dấu # có phải để câu lệnh ko có giá trị ?
*Options Indexes FollowSymLinks MultiViews ExecCGI <<<????
* [R=301,L] ???????????
*[R] ??????????

Ko thì bạn giải thích hết toàn bộ càng tốt .

khucthuydu
29-06-2005, 16:17
Acac....bun Ca? Ngay Chang Thay Ai Tra Loi Duoc 6 Ngoi Doc
:d Botay.com