V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
DearTanker
V2EX  ›  问与答

有没有在用 AMH5 的, Pagekit 你们装的上吗?

  •  
  •   DearTanker · 2017-02-01 22:03:26 +08:00 · 1807 次点击
    这是一个创建于 2885 天前的主题,其中的信息可能已经有所发展或是发生改变。

    不管是 LNMP 还是 LAMP ,安装界面都过不去。

    感觉是伪静态没调好。读取语言这块没有走伪静态。。

    有装上的可以分享一下伪静态配置吗?

    .htaccess如下:

    # Restricted access to files
    <FilesMatch "((\.(lock|cache|db))|installed.json|composer.json|package.json|bower.json|CHANGELOG.md|README.md|gulpfile.js|webpack.config.js|pagekit)$">
          # Apache < 2.3
            <IfModule !mod_authz_core.c>
                Order allow,deny
                Deny from all
                Satisfy All
            </IfModule>
    
            # Apache ≥ 2.3
            <IfModule mod_authz_core.c>
                Require all denied
            </IfModule>
    </FilesMatch>
    
    # Don't show directory listings
    <IfModule mod_autoindex.c>
        Options -Indexes
    </IfModule>
    
    # URL rewrites
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        # Set base if your site is running in a VirtualDocumentRoot
        # RewriteBase /
    
        # Redirect requests to access the site with the 'www.' prefix
        # RewriteCond %{HTTP_HOST} .
        # RewriteCond %{HTTP_HOST} !^www\. [NC]
        # RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
    
        # Redirect requests to access the site without the 'www.' prefix
        # RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
        # RewriteRule ^ https://%1%{REQUEST_URI} [L,R=301]
    
        # Redirect requests to access the site with HTTPS
        # RewriteCond %{HTTPS} off
        # RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R]
    
        # Rewrite request to use the index.php
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^ index.php [L]
    
        <IfModule mod_env.c>
            SetEnv HTTP_MOD_REWRITE On
        </IfModule>
    
         <IfModule !mod_env.c>
            <IfModule mod_headers.c>
                RequestHeader set MOD_REWRITE "On"
            </IfModule>
         </IfModule>
    </IfModule>
    
    # Redirect admin URL, if rewrite is not enabled
    <IfModule !mod_rewrite.c>
        <IfModule mod_alias.c>
    
            RedirectMatch (.*)(?<!index.php)\/admin$ $1/index.php/admin
    
        </IfModule>
    </IfModule>
    
    # Media types
    <IfModule mod_mime.c>
        AddType image/svg+xml svg svgz
    
        <IfModule mod_deflate.c>
            AddEncoding gzip svgz
        </IfModule>
    </IfModule>
    
    # Normalize javascript mime type
    <IfModule mod_mime.c>
        AddType application/javascript js
    </IfModule>
    
    # Compression
    <IfModule mod_deflate.c>
        # Force compression for mangled `Accept-Encoding` request headers
        # https://developer.yahoo.com/blogs/ydn/pushing-beyond-gzipping-25601.html
        <IfModule mod_setenvif.c>
            <IfModule mod_headers.c>
                SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
                RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
            </IfModule>
        </IfModule>
    
        <IfModule mod_filter.c>
            AddOutputFilterByType DEFLATE "application/javascript" \
                                          "application/json" \
                                          "application/rss+xml" \
                                          "image/bmp" \
                                          "image/svg+xml" \
                                          "image/x-icon" \
                                          "text/css" \
                                          "text/html" \
                                          "text/plain"
        </IfModule>
    </IfModule>
    
    # Expire headers
    <IfModule mod_expires.c>
        ExpiresActive on
        ExpiresDefault                        "access plus 1 week"
    
        ExpiresByType application/json        "access plus 0 seconds"
        ExpiresByType application/rss+xml     "access plus 0 seconds"
        ExpiresByType text/html               "access plus 0 seconds"
        ExpiresByType text/plain              "access plus 0 seconds"
    
        # Use expires far in the future for css and javascript because Pagekit uses filenames to break the cache
        ExpiresByType text/css                "access plus 1 year"
        ExpiresByType application/javascript  "access plus 1 year"
    </IfModule>
    
    # Avoid PHP 5.6 deprecated $HTTP_RAW_POST_DATA warnings
    <IfModule mod_php5.c>
        php_value always_populate_raw_post_data -1
    </IfModule>
    
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3585 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 04:33 · PVG 12:33 · LAX 20:33 · JFK 23:33
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.