Question Sử dụng htaccess trên apache

Thảo luận trong 'Hosting - Server - Domain' bắt đầu bởi chickenkon, 27/10/13.

1votes
5/5, 1 vote

  1. chickenkon

    chickenkon Member

    Bài viết:
    225
    Likes :
    29
    các bác cho em hỏi em có cấu hình còn vps để chạy cái 4rum của em và trong cấu hình của apache em đã load module mod_rewrite nhưng sao vẫn không thể sử dụng được file .htaccess để chạy urls :(
    bác nào biết chỉ giúp em với ạ, em cảm ơn :(
     
    Đang tải...
  2. sanvu88

    sanvu88 Well-Known Member

    Bài viết:
    1,048
    Likes :
    467
    Bạn post file htacess lên mọi người cùng xem xem có giúp được gì không nhé
     
    chickenkon thích bài này.
  3. chickenkon

    chickenkon Member

    Bài viết:
    225
    Likes :
    29
    nó đây bác :(
    Mã:
    </Ifmodule>
    #    Mod_security can interfere with uploading of content such as attachments. If you
    #    cannot attach files, remove the "#" from the lines below.
    #<IfModule mod_security.c>
    #    SecFilterEngine Off
    #    SecFilterScanPOST Off
    #</IfModule>
    
    ErrorDocument 401 default
    ErrorDocument 403 default
    ErrorDocument 404 default
    ErrorDocument 500 default
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        #    If you are having problems with the rewrite rules, remove the "#" from the
        #    line that begins "RewriteBase" below. You will also have to change the path
        #    of the rewrite to reflect the path to your XenForo installation.
        #RewriteBase /xenforo
    
        #    This line may be needed to enable WebDAV editing with PHP as a CGI.
        #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    
        RewriteCond %{REQUEST_FILENAME} -f [OR]
        RewriteCond %{REQUEST_FILENAME} -l [OR]
        RewriteCond %{REQUEST_FILENAME} -d
        RewriteRule ^.*$ - [NC,L]
        RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
        RewriteRule ^.*$ index.php [NC,L]
    redirect 301 /4rum /
    RewriteBase /
        RewriteCond %{HTTP_HOST} !^choa37.org$ [NC]
        RewriteRule ^(.*)$ http://choa37.org/$1 [L,R=301]
        Options All -Indexes
    </IfModule>
    
     
  4. UpReseller

    UpReseller Member

    Bài viết:
    195
    Likes :
    117
    Bạn tắt cái này đi nhé. Một số hosting không cấu hình chạy cái này mặc định. :)

    Mã:
    Options All -Indexes
     
    chickenkon thích bài này.
comments powered by Disqus

Chia sẻ trang này

Đang tải...