Question Cho hỏi về Rewrite URL bằng htaccess

Thảo luận trong 'XenForo Development' bắt đầu bởi huuthai37, 29/4/15.

  1. huuthai37

    huuthai37 New Member

    Bài viết:
    17
    Likes :
    2
    Hiện tại em đang viết một cái mod đơn giản, nhưng muốn chuyển link cho đẹp hơn,
    từ film?ep=1 sang film/tap-1, nhưng ko hiểu sao nó cứ báo lỗi, kiểm tra mod rewrite bật rồi
    Cái file .htaccess đây ạ
    Mã:
    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 /xf
    
        #    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]
        RewriteRule ^film/tap-([0-9]+)$ film?ep=$1 [NC,L]
    Mong mọi người giúp đỡ ạ
     
    Đang tải...
comments powered by Disqus

Chia sẻ trang này

Đang tải...