• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Help Cần hướng dẫn fix lỗi rule .htaccess

yoona

New Member
File .htacces của e đây ....

Options -Indexes
ErrorDocument 402 /402.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
DirectoryIndex index.php index.html

RemoveHandler .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py
AddType application/x-httpd-php-source .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py

AddDefaultCharset UTF-8
<FilesMatch "(\.ini|\.htaccess|error_log)$">
Order Allow,Deny
</FilesMatch>

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A1209600
<FilesMatch \.php$>
ExpiresActive Off
</FilesMatch>
</IfModule>
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml
AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml
AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json
AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf
AddOutputFilterByType DEFLATE font/truetype font/opentype
</ifModule>
<ifModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 216000 seconds"
ExpiresByType application/javascript "access plus 216000 seconds"
ExpiresByType application/x-javascript "access plus 216000 seconds"
ExpiresByType text/html "access plus 600 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
</ifModule>
<ifModule mod_headers.c>
<filesMatch "\.(ico|jpe?g|png|gif|swf)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(css)$">
Header set Cache-Control "public"
</filesMatch>
<filesMatch "\.(js)$">
Header set Cache-Control "private"
</filesMatch>
<filesMatch "\.(x?html?|php)$">
Header set Cache-Control "private, must-revalidate"
</filesMatch>
</ifModule>

<ifmodule mod_php4.c>
php_value zlib.output_compression 16386
</ifmodule>

<Files .htaccess>
order allow,deny
deny from all
</Files>

RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]
RewriteRule ^tags/(.*)$ forum/search.php?t=1&search=$1 [L]
RewriteRule ^youtube/search/(.+)/page/(.+)$ youtube/index.php?q=$1&page=$2
RewriteRule ^youtube/search/(.+)$ youtube/index.php?q=$1
RewriteRule ^youtube/page/(.+)$ youtube/index.php?page=$1
RewriteRule ^youtube/download/(.+)/(.+).html$ /youtube/download.php?id=$1&ln=$2
RewriteRule ^404.html$ closed.php [L]
RewriteRule ^403.html$ closed.php [L]
RewriteRule ^402.html$ closed.php [L]
RewriteRule ^500.html$ closed.php [L]
RewriteRule ^chat.html$ guestbook
RewriteRule ^chat$ guestbook/index.php

RewriteRule ^forum/([0-9]+).(.*)_trang-([0-9]+).html$ forum/index.php?id=$1&trang=$3 [L]
RewriteRule ^forum/([0-9]+).(.*).html$ /forum/index.php?id=$1 [L]
RewriteRule ^forum/([0-9]+).(.*).html/page([0-9]+)$ /forum/index.php?id=$1&page=$3 [L]
RewriteRule ^forum/(.*).html/([0-9]+)$ /forum/index.php?act=post&id=$2 [L]
RewriteRule ^forum/like/([0-9]+).(.*).html#like$ /forum/index.php?act=like&id=$1#like [L]
RewriteRule ^forum/like/([0-9]+).(.*).html&dis#like$ /forum/index.php?act=like&id=$1&dis#like [L]
RewriteRule ^forum/(.*)_([0-9]+).s([0-9]+).html$ /forum/index.php?id=$2&start=$3 [L]
RewriteRule ^forum/(.*)_([0-9]+)_clip.p([0-9]+).html$ /forum/index.php?id=$2&clip&page=$3

order allow, deny
deny from 210.211.106.
deny from 192.254.185.54
deny from 188.95.
deny from 31.170.
deny from 93.188.
deny from 107.161.
deny from 31.220.
allow from all
 
Lỗi rules này gây ra lỗi 500, em sửa như sau:
PHP:
ErrorDocument 402 /402.html
ErrorDocument 403 /403.html
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^TRACE
RewriteCond %{HTTP:range} !(^bytes=[^,]+(,[^,]+){0,4}$|^$)
RewriteRule .* - [F]
RewriteRule ^tags/(.*)$ forum/search.php?t=1&search=$1 [L]
RewriteRule ^youtube/search/(.+)/page/(.+)$ youtube/index.php?q=$1&page=$2
RewriteRule ^youtube/search/(.+)$ youtube/index.php?q=$1
RewriteRule ^youtube/page/(.+)$ youtube/index.php?page=$1
RewriteRule ^youtube/download/(.+)/(.+).html$ /youtube/download.php?id=$1&ln=$2
RewriteRule ^404.html$ closed.php [L]
RewriteRule ^403.html$ closed.php [L]
RewriteRule ^402.html$ closed.php [L]
RewriteRule ^500.html$ closed.php [L]
RewriteRule ^chat.html$ guestbook
RewriteRule ^chat$ guestbook/index.php

RewriteRule ^forum/([0-9]+).(.*)_trang-([0-9]+).html$ forum/index.php?id=$1&trang=$3 [L]
RewriteRule ^forum/([0-9]+).(.*).html$ /forum/index.php?id=$1 [L]
RewriteRule ^forum/([0-9]+).(.*).html/page([0-9]+)$ /forum/index.php?id=$1&page=$3 [L]
RewriteRule ^forum/(.*).html/([0-9]+)$ /forum/index.php?act=post&id=$2 [L]
RewriteRule ^forum/like/([0-9]+).(.*).html#like$ /forum/index.php?act=like&id=$1#like [L]
RewriteRule ^forum/like/([0-9]+).(.*).html&dis#like$ /forum/index.php?act=like&id=$1&dis#like [L]
RewriteRule ^forum/(.*)_([0-9]+).s([0-9]+).html$ /forum/index.php?id=$2&start=$3 [L]
RewriteRule ^forum/(.*)_([0-9]+)_clip.p([0-9]+).html$ /forum/index.php?id=$2&clip&page=$3

order allow, deny
deny from 210.211.106.
deny from 192.254.185.54
deny from 188.95.
deny from 31.170.
deny from 93.188.
deny from 107.161.
deny from 31.220.
allow from all
Thay thế đoạn này vào .htaccess cũ của em là được
 
Em tạo htaccess được 1 lúc nó tự mất là sao ạ :)
Đó là nó ẩn không phải bị mất
Em có thể thao tác trên
Code:
http://wapftp.tuoitreit.vn
 

Facebook Comments

Similar threads

New posts New threads New resources

Back
Top