首页 > 代码库 > RewriteRule? ??? URL ??

RewriteRule? ??? URL ??

/program/www/.htaccess

 

RewriteEngine On RewriteBase / RewriteCond $1 !^(optimizer\.php)RewriteRule ^(.*)$ index.php?controller=$1&%{QUERY_STRING} [L]

???? ??? ??? ??? ??? ??????? htaccess ????? ??? ????? ???.

AccessFileName .htaccess <Directory "/path/to/~">    Options +FollowSymLinks    AllowOverride All    Order allow,deny    Allow from all</Directory>

 

??? ???? ??

RewriteEngine On RewriteBase / RewriteCond $1 !^(optimizer\.php|img)RewriteRule ^(.*)$ index.php?controller=$1&%{QUERY_STRING} [L]

 

 

 

 

 

conf/rewrite.conf

RewriteEngine OnRewriteRule ^/img($|/.*) /home/resource/img/$1 [PT]RewriteRule ^/optimizer\.php /home/12r/framework/direct/optimizer.php?%{QUERY_STRING} [L]RewriteRule ^(.*)$ /home/12r/framework/index.php?controller=$1&%{QUERY_STRING} [L]

 

conf/alias.conf

Alias /img "/home/resource/img"<Directory "/home/resource/img">    Options MultiViews    AllowOverride None    Order allow,deny    Allow from all</Directory>

 

Virtual Host ??

<VirtualHost *:80>    DocumentRoot "/home/user1/www"    ServerName foobar.cafe24test.com    ServerAlias foobar.cafe24test.com     Include conf/alias.conf    Include conf/rewrite.conf</VirtualHost>

 

RewriteRule? ??? URL ??