我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

htaccess中的RewriteRule重命名[重复]

This question already has an answer here:

  • Reference: mod_rewrite, URL rewriting and “pretty links” explained 4 answers

Hello all i want to make, that user goes to directory:

www.myweb.com/invites/User

It would work as

www.myweb.com/invites/index.php?u=User

I tried something, but doesn't work.

</div>

In the folder invites, create a .htaccess file or use apache rewrite: http://httpd.apache.org/docs/current/mod/mod_rewrite.html

The rule is :

RewriteEngine On
RewriteRule ^(\w+)$ index.php?u=$1

近期文章

  • 重定向到子文件夹中的索引
  • PHP包含两个css文件[关闭]
  • 用htaccess重定向到* page
  • Mysql注册代码无法正常工作[关闭]
  • 如何使我的PHP滑块工作
  • PHP匹配数组中的3个键
  • 添加/清除命令到html表单
  • PHP变量的JSON KEY / VALUE
  • PHP:从多数组获取值
  • 传递on on on函数
  • 如何在xampp中安装pdflib?
  • 简单的PHP错误MVC结构
  • 使用Ruby on Rails保护数据?
  • 在html页面中显示html代码
  • Codeigniter搜索不起作用
  • 找到所有可能的序列
  • mysql到mysqli php,只是把“我”? [重复]
  • 如何自动加载页面?
  • PHP方法没有返回值
  • 为什么我输入parent :: __ construct?

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华