HTAccess重写动态页面网址

编程入门 行业动态 更新时间:2024-10-25 04:27:28
本文介绍了HTAccess重写动态页面网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

感谢您的提前帮助

基本上我已经创建了一个动态URL网站planet-dj-surrey/

Basically i have made a dynamic url website planet-dj-surrey/

我似乎无法找出htaccess文件的代码来重定向动态页面并使它更整洁.

I cant seem to figure out the code for the htaccess file to redirect a dynamic page and make it cleaner.

例如我想要planet-dj-surrey/index.php?page=designprocess 更改为

planet-dj-surrey/designprocess/

目前我有这个,但它似乎没有用,

currently i have this but it does not seem to be working,

RewriteEngine On RewriteRule ^/dropdownchoice/$ index.php?page=dropdownchoice [NC]

预先感谢

推荐答案

您需要丢掉斜杠:

RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/$ index.php?page=$1 [NC]

更多推荐

HTAccess重写动态页面网址

本文发布于:2023-11-01 12:05:28,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549285.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重写   页面   网址   动态   HTAccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!