pretty的URL与htaccess的? [英] pretty url with .htaccess?

查看:290
本文介绍了pretty的URL与htaccess的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建,运行一些PHP和放了一个新词preSS的页面模板,它里面的MySQL的脚本和我想申请mod-rewrite它的子页面

i just created a new wordpress page template that runs some php&mysql scripts inside it and i would like to apply mod rewrite to it's subpages.

例如,我有以下链接生成的:

for instance i have the following link generated:

http://www.quotist.com/quotes-by- authors.html?信= D

我怎样才能将其转化成类似:

how can i transform this into something like:

http://www.quotist.com/quotes-by-authors /信/ D /

在我的htaccess的,我有一个字preSS生成的默认code ...

in my htaccess i have the default code generated by wordpress ...

没有人知道如何实现这一目标?

does anyone know how to achieve that?

推荐答案

试试这个:

Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine on
RewriteBase /

RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]

RewriteCond %{QUERY_STRING} ^(letter)=(\w)$ [NC]
RewriteRule ([^.]+)\.html http://www.quotist.com/$1/%1/%2? [L,R=301]

RewriteCond %{REQUEST_URI} ^/([\w-]+)/(letter)/\w/? [NC]
RewriteRule ^ /%1.html?%2=%3 [L,QSA]

这篇关于pretty的URL与htaccess的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆