在这里,我可以获得apache .htaccess的所有入门知识。
下面这几行是什么意思:
RewriteEngine打开
RewriteRule ^(a-z0-9-_*)$ index.php?do=$1 NC
RewriteRule ^(a-z0-9-_*)/$ index.php?do=$1 NC
发布于 2012-05-17 19:05:07
签出文档atL
http://httpd.apache.org/docs/current/howto/htaccess.html
你提到的命令是重写引擎的一部分,“一个基于规则的重写引擎,用于动态重写请求的URL”。
来自文档:
RewriteEngine指令
描述:启用或禁用运行时重写引擎
语法: RewriteEngine on|off
致以亲切的问候,
Bo
发布于 2012-05-17 19:44:22
这意味着URL将被重写,即:
http://yourdomain.com/whatever
将在内部转换为类似如下的内容:
http://yourdomain.com/index.php?do=whatever
https://stackoverflow.com/questions/10634482
复制相似问题