apache_conf 基本重写条件
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了apache_conf 基本重写条件相关的知识,希望对你有一定的参考价值。
Options +FollowSymlinks
RewriteEngine on
# This will rewrite http://mysite/campaignslug to http://mysite/index.php?campaign=campaignslug
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)$ index.php?campaign=$1 [L]
# This will rewrite http://mysite/campaignslug/galleryslug to http://mysite/index.php?campaign=campaignslug&gallery=galleryslug
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)$ index.php?campaign=$1&gallery=$2 [L]
以上是关于apache_conf 基本重写条件的主要内容,如果未能解决你的问题,请参考以下文章
apache_conf 必须启用postname permalinksApache重写模块的基本.htaccess文件 - 主要用于YeoPress
apache_conf HtAccess重写规则
apache_conf HTTPS重写.htaccess
apache_conf 重写Shopware Mittwald https
apache_conf 将HTTP重写(强制)为HTTPS
apache_conf 重写URL以删除文件扩展名