url - 长 url (rewrite mod) 子页面的问题
问题描述
我正在寻找知道主要代码的人
我的子页面名称难看www.forexample.eu/index_pl.php?src=home这个网址如何剪裁www.forexample.eu/start
请告诉我怎么做?
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+)/?$ index_pl.php?src=home=$1&subpage=$2 [L,QSA]
解决方案
尝试以下操作:
RewriteEngine ON
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^start index_pl.php?src=home [L]
如果您的链接是www.forexample.eu/start
它会加载www.forexample.eu/index_pl.php?src=home
“在后面”,但它仍会显示第一个链接。
推荐阅读
- javascript - CRA window.location.reload(true) 不更新 PWA
- django - 访问 ImageField url 时如何避免提供服务器地址
- java - 我可以使用 React Native 的异步存储从本地存储中获取值吗?
- docker - 无法启动 Hyper-V 容器
- angular - 更新 EntityAdapter 中的数组
- android - 如何将图像绑定到 ImageButton 尺寸?
- c# - 从方法返回模型(DTO)的最佳实践是什么?
- angular - 为什么在 Angular 5 应用程序的屏幕上显示 null?
- c# - 如何确保其他应用程序使用我的 dll
- javascript - 如何在不涉及浏览器的情况下从 url 下载文件