全球主机交流论坛

标题: 求chevereto在apache下的rewrite规则 [打印本页]

作者: creeper    时间: 2015-5-16 11:36
标题: 求chevereto在apache下的rewrite规则
找了个开心版,但是由于空间原因,程序无法自动创建rewrite,所以求一个完整的apache下chevereto的rewrtie规则
作者: a1507965    时间: 2015-5-16 11:36
creeper 发表于 2015-5-16 13:20
开心版忘了提供了,有的话分享一下呗
  1. # Disable server signature
  2. ServerSignature Off

  3. # Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
  4. Options -Indexes
  5. Options -MultiViews
  6. Options +FollowSymLinks

  7. <IfModule mod_rewrite.c>

  8.         RewriteEngine On
  9.        
  10.         # If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
  11.         # You will also have to change the path to reflect the path to your Chevereto installation
  12.         # If you are using alias is most likely that you will need this.
  13.         #RewriteBase /
  14.        
  15.         # 404 images
  16.         # If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
  17.         # Make sure to apply the correct paths to reflect your current installation
  18.         RewriteCond %{REQUEST_FILENAME} !-f
  19.         RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
  20.         #RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/images/system/404.gif [NC,L]

  21.         RewriteCond %{REQUEST_FILENAME} !-f
  22.         RewriteCond %{REQUEST_FILENAME} !-d
  23.         RewriteCond %{REQUEST_URI} !\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
  24.         RewriteRule . index.php [L]
  25.        
  26. </IfModule>
复制代码

作者: creeper    时间: 2015-5-16 12:03
没人玩这个吗?
作者: a1507965    时间: 2015-5-16 12:55
程序目录下不是自带有 .htaccess 么         
作者: creeper    时间: 2015-5-16 13:20
a1507965 发表于 2015-5-16 12:55
程序目录下不是自带有 .htaccess 么

开心版忘了提供了,有的话分享一下呗




欢迎光临 全球主机交流论坛 (https://443502.xyz/) Powered by Discuz! X3.4