如果你的网页出现301或404对于用户体验来讲是一个非常严重的问题了,所以我们在做php header301或404时就必须小心再小心了。
301跳转,代码如下:
- header('HTTP/1.1 301 Moved Permanently');
- header('Location: http://www.abc.com/aaa/');
- exit();
不要漏了header(‘HTTP/1.1 301 Moved Permanently’); 不然返回不了301
404错误页面,代码如下:
header("HTTP/1.1 404 Not Found");
如果上面的不起作用,可以试试下面的,代码如下:
header("Status: 404 Not Found");
所以为了万无一失,可以两句都写上,代码如下:
- header("HTTP/1.1 404 Not Found");
- header("Status: 404 Not Found");
小提示,如果写好代码之后我们必须使用站长工具来测试一下返回的状态是不是我们想要的哦
波比源码 – 精品源码模版分享 | www.bobi11.com
1. 本站所有资源来源于用户上传和网络,如有侵权请邮件联系站长!
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 本站源码并不保证全部能正常使用,仅供有技术基础的人学习研究,请谨慎下载
8. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
波比源码 » php header中301/404跳转要注意事项详解
波比源码 » php header中301/404跳转要注意事项详解
order levofloxacin 500mg generic buy levaquin 500mg pills
cialis 20mg en france sildenafil 25mg sans ordonnance generique viagra
cialis 20 mg price buy amantadine 100mg online cheap symmetrel for sale online
buy luvox 100mg generic order generic luvox 50mg order glucotrol without prescription
cialis 5 mg order cialis 20mg for sale real viagra 100mg
cephalexin 500mg ca cleocin 150mg cheap buy erythromycin 500mg sale
free slot machine games buy tadalafil 5mg pills order tadalafil 20mg pill
lamisil buy online cefixime without prescription amoxicillin 500mg ca
cialis black Cialis free samples tadalafil 40mg uk
buy generic temovate buspar 5mg cheap cordarone 100mg over the counter
acetazolamide 250 mg canada imuran 50mg drug buy azathioprine 50mg
cost digoxin 250mg digoxin 250mg without prescription purchase molnupiravir pills
carvedilol 6.25mg pill carvedilol 25mg us order amitriptyline 10mg pills
buy priligy 30mg sale cost avanafil 200mg purchase motilium sale
fosamax 35mg ca buy alendronate 70mg online cheap brand ibuprofen 600mg
buy indocin 75mg pills flomax 0.4mg brand cenforce uk
order pamelor 25 mg pills nortriptyline 25 mg canada paroxetine 10mg without prescription
order tadalafil 10mg generic purchase clopidogrel sale order amoxicillin online
tricor 160mg brand brand tricor 160mg viagra 100mg pills
minocin 50mg capsules buy minocin 50mg for sale order terazosin sale
order cialis 40mg buy ed meds buy erectile dysfunction medicine
oral provigil buy modafinil 100mg pill phenergan price
order generic accutane 20mg buy ampicillin 250mg without prescription cheap acillin
cost fildena 100mg buy lyrica online cheap proscar 5mg cheap
ivermectin nz prednisone usa order deltasone 40mg sale
ventolin 2mg us oral augmentin amoxiclav us
order prednisolone for sale buy prednisolone 20mg pills furosemide 100mg generic
doxycycline 100mg sale buy zovirax 400mg generic zovirax 800mg uk
avodart for sale purchase dutasteride pills orlistat cheap
buy generic azathioprine buy telmisartan 20mg naprosyn 250mg brand
order ditropan 5mg generic order oxcarbazepine 600mg generic buy oxcarbazepine sale
buy omnicef 300mg online cheap buy lansoprazole online cheap protonix 40mg pill
order alfuzosin 10mg generic brand diltiazem order diltiazem pill
viagra 50mg sale overnight delivery viagra generic tadalafil
warfarin pills buy reglan 20mg pill order allopurinol 100mg pill