1.
httpd.conf中确保
LoadModule rewrite_module modules/mod_rewrite.so

2.

<Directory "C:/php/mywork">

   

#AllowOverride None改成


AllowOverride All

</Directory>

3.实验一
建立一个.htaccess文件,目的是将alice.html=>bob.html

RewriteEngine on
RewriteRule ^alice.html$ bob.html
 
4.实验二
code igniter去掉index.php的例子

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ test/index.php/$1 [L]

相关文章:

  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2021-12-10
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2021-08-27
猜你喜欢
  • 2021-07-17
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2021-10-11
  • 2022-12-23
相关资源
相似解决方案