如何在php中更改url [英] How to change url in php

查看:112
本文介绍了如何在php中更改url的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hii ....



我正在本地创建一个优惠券网站作为网址结构

www.couponcoderock.com/ merchant.php?cid = 12

此页面有godaddy商家

现在我需要这个

www.couponcoderock.com/godaddy-coupon -code

所以我能为此做些什么...我需要使用.htaccess文件或任何其他方式...

我们在.htaccess文件中尝试但是它显示错误,因为找不到404错误

plz伙伴们让我知道...

hii....

I am creating a coupon website in my local as URL structure
www.couponcoderock.com/merchant.php?cid=12
this page has godaddy merchant
Now i need as this
www.couponcoderock.com/godaddy-coupon-code
so what can i do for this...i need to use .htaccess file or any other way...
we have tried in .htaccess file but it shows error as not found 404 error
plz guys let me know...

推荐答案

这些问题可以通过解决URL重写 http://en.wikipedia.org/wiki/Rewrite_engine [ ^ ]。



As这是Apache,您可以使用:

http://httpd.apache .org / docs / 2.0 / misc / rewriteguide.html [ ^ ]。



-SA
Such problems can be solved using URL rewriting: http://en.wikipedia.org/wiki/Rewrite_engine[^].

As this is Apache, you can use this:
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html[^].

—SA


这篇关于如何在php中更改url的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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