首页 > 解决方案 > 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&section=$2 [NC,L]

标签: php.htaccess

解决方案


解决方案是添加

<base href="/">

在头部标签中


推荐阅读