如何使用htaccess编写seo友好的URL? [英] How to write seo friendly url's using htaccess?

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

问题描述

我想为我的网站创建seo友好的网址。我想从.htaccess文件创建它。我对.htaccess的了解很少。

I want to create seo friendly url's for my website. I want to create it from .htaccess file. I have very less knowledge about .htaccess

我有以下网址
http://www.testsite.com/index.php?dispatch=flowers_search.flowers_search_result&city=Pune&type=康乃馨

我需要显示如下网址,
http://www.testsite.com/flowers/Pune/康乃馨

I need to display url as follows, http://www.testsite.com/flowers/Pune/Carnation

谢谢

推荐答案

http://www.generateit.net / mod-rewrite /

导致:

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /index.php?dispatch=flowers_search.flowers_search_result&city=$1&type=$2 [L]

这篇关于如何使用htaccess编写seo友好的URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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