开发者

Do PHP scripts work if htaccess url rewrite is implemented?

开发者 https://www.devze.com 2023-01-04 17:57 出处:网络
If I use mod-rewrite to change a ur开发者_运维问答l like this: http://www.mysite.com/page.php?title=my-name-is-john

If I use mod-rewrite to change a ur开发者_运维问答l like this:

http://www.mysite.com/page.php?title=my-name-is-john

to

http://www.mysite.com/page/my-name-is-john

and if the page.php file contains a script that relies on parameters passed through the url like:

$_GET['title'];

Then will that script still work after the mod-rewrite has been implemented?


Yes, mod rewrite is transparent to the php scripts. So for the script it seems was just requested with the old url.


Yes. Your script will still work.

(ModRewrite is essentially transparent to PHP/and other CGIs you run.)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号