.htaccess - .htaccess 重写 Category/page/1
问题描述
这是我当前的代码.htaccess
# Rewrite for category.php?cat=xxxxx
RewriteRule ^category/([0-9a-zA-Z-]+) category.php?cat=$1&page=$2 [NC,L]
我越来越category/dog/1
但是我怎么能做到这样:
category/dog/page/1
解决方案
这是阅读和测试后的答案;
RewriteRule ^category/([0-9a-zA-Z-]+)/page/([0-9a-zA-Z_-]+) category.php?cat=$1&pagi=$2 [NC,L]
推荐阅读
- ios - WebRTC 的 XCFramework 更新后的任何 iOS 设备构建错误
- javascript - Java/JS 中的字符编码问题,字段中带有“é”字符
- python - MQTT 客户端断开连接
- django - 在 django-simple-jwt 包中,如何根据不同的签名算法和密钥有条件地验证密码?
- gerrit - How and When to use Follow Up feature of Gerrit efficiently?
- java - 如何在 Spring Boot 中使端点初始化异步?
- python - Change Bot From Hashtag To URL Tweepy
- javascript - Stuck on creating a preliminary tic tac toe board that places an 'x' in square you click. How do I combine previous board with current board?
- sql-server - Non-dynamic way to change sql_variant collation and keep type and size
- arrays - AngularJS array iterate object and compare strings inside it