php - htaccess rewrite clean url 需要永远加载
问题描述
我正在尝试重写我的 URL,但是当我在 htaccess 中执行此操作时,页面加载将永远持续,并且加载时没有样式并且图像为空白,似乎无法说出问题所在,我没有看到代码中的任何问题,你能帮忙吗?
为 profile.php?user_id=1§ion=discussions 重写干净的 url
RewriteRule ^profile/([0-9]+)/([0-9a-zA-Z_-]+) profile.php?user_id=$1§ion=$2 [NC,L]
解决方案
解决方案是添加
<base href="/">
在头部标签中
推荐阅读
- angular - 如何在Angular材料中为文本输入着色
- ruby-on-rails - 如何计算多对多模型的特征向量?
- node.js - User.findAll 不是函数
- python - 为多个属性绘制图形 + matplotlib
- php - Codeigniter SaaS 应用程序 - cli cron 作业上的动态数据库选择
- html - 将div的高度设置为父div的底部
- r - 使用带有 JDBC 驱动程序的 R dbGetQuery 函数的多线程
- blazor - Blazor 中是否有与 Html.Raw 等效的内容?
- reactjs - 为什么我从 Marvel API 收到 InvalidCredentials 错误?
- sql - 显示员工姓名、休假、合格休假和百分比的查询