.htaccess重定向带有加载的css,js和image的URL

时间:2017-05-26 10:37:52

标签: apache laravel .htaccess mod-rewrite

我正在尝试重写.htaccess文件中的网址,尝试了很多但最终却感到沮丧。

的.htaccess

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>
        RewriteEngine On
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond    ^suba/?$    resources/uploads/releases/zipfiles/1484883480/index\.html [NC, C]
        RewriteRule ^ index.php [L]

我只是想用这样的短网址打开this,以使其更加友好SEO http://dittmagasin.no/release

我已提到以下帖子:

  1. URL rewriting with PHP
  2. URL rewriting for beginners
  3. 任何帮助将不胜感激。 感谢

1 个答案:

答案 0 :(得分:1)

您可以使用:

RewriteEngine On

RewriteRule ^release/?$ resources/uploads/releases/zipfiles/1484883480/index.html [NC,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]