手机浏览 RSS 2.0 订阅 膘叔的简单人生 , 腾讯云RDS购买 | 超便宜的Vultr , 注册 | 登陆
浏览模式: 标准 | 列表Tag:weibo

apache 404转发

平时我们用apache的404转发,大多数是:
ErrorDocument 404 /404.html
但这样其实也只能做到404的提示信息,会更加人性化一一点,但事实上我们要做到几件事情
比如我的图片不存在,我转发后,会根据图片的URL自动生成一张,这一点行不行呢?
于是乎,利用404转发就势在必行了
ErrorDocument 404 /xxx.php
在PHP里写上
<?php
header("Location:http://xxx.xxx.com".$_SERVER['REQUEST_URI']);
?>
或许有人说,为什么我的不起作用呢?
嗯,在ErrorDocument中,如果用其他域名就不行了
比如说我ErrorDocument 404 http://xxx.xxx.com/xxx.php
在其他域名下的Xxx.php不要说$_SERVER['REQUEST_URI']取不到,连HTTP_REFERER也没有的。
所以,还是在自己当前的项目写一下文件 ,利用header转发一下才是最OK的

Tags: apache, 404, header

笔记1

这段时间在和IOS开发的同事们互相配合,本来是有笔记都会记录下来的。然而那段时间网站备案出点问题。然后就没有记录下来。于是现在开始就要把当时遇到的一些问题开始记录了。
比如这个。原本程序写的时候没有考虑推送,但是在进行了一阵后,发现还是需要推送才行,但当时创建的版本是是类似xxx.xxx.*,如果用推送的话就不能xxx.xxx.*,而是要用具体的版本(因为不是我写的啦,所以说不太清楚),后来找到了官方的介绍:
http://developer.apple.com/library/ios/#qa/qa1680/_index.html

可以从这里看:

Updating from a wildcard App ID to an explicit App ID

Q:  My application is currently signed with a Provisioning Profile that uses a wildcard App ID. How do I enable my App ID to support In App Purchase or Apple Push Notification service?

A: My application is currently signed with a Provisioning Profile that uses a wildcard App ID. How do I enable my App ID to support In App Purchase or Apple Push Notification service?

In App Purchase and Apple Push Notification service require that your application is signed with a Provisioning Profile, which uses an explicit App ID such as com.mycompany.myappname. So, if you have shipped an application signed with a Provisioning Profile that uses a wildcard App ID such as com.mycompany.*, you may wonder how to enable that App ID to handle these features. The answer is to keep your project's Bundle ID the same and create a new App ID in the iPhone Portal that matches the Bundle ID you are currently using in your project. Follow the steps below to enable an App ID that supports In App Purchase or Apple Push Notification service:

  1. Identify your application's current Bundle ID

    You can find your Bundle ID by looking in your project's Info.plist file, however it is best to check what iTunes Connect says it is. Log in to iTunes Connect, navigate to the Manage Your Applications module present in the home page, then select the App Details link for the application you are updating, and copy the bundle identifier displayed in the ensuing page.

  2. Create a new App ID

    Your Team Agent or Team Admin should log in to the iPhone Portal and navigate to its App ID section to create a new App ID. In the App ID section, click on the New App ID button to navigate to the Create App ID form, which contains a Description field, a Bundle Identifier field, a Bundle Seed ID pop-up menu, and a Submit button as shown in Figure 1. Fill out the Description field with a meaningful name such as Explicit App ID for MyAppName for your App ID, select Generate New from the Bundle Seed ID pop-up menu, and paste the previously copied bundle identifier into the Bundle Identifier field. Click Submit to save the new App ID.

Figure 1  Create App ID form

大小: 91.6 K
尺寸: 500 x 329
浏览: 1717 次
点击打开新窗口浏览全图

  1. Enable the newly created App ID for In App Purchase or Apple Push Notification service

    Find your App ID in the App ID section of the Program Portal, click the Configure link next to it, and follow the instructions to enable your App ID for either In App Purchase or Apple Push Notification service.

  2. Update or create, download, and install a Provisioning Profile that uses your App ID enabled for In App Purchase or Apple Push Notifications

    Edit an existing Provisioning Profile or create a new one, and then associate it with your newly created App ID. Download and install this Provisioning Profile on your machine and select it in the Code Signing Identity section of your Target's Build pane in Xcode. Update the version number of your binary, build it, test it, and upload it to iTunes Connect for review.

看最后的两点就知道怎么操作了啦。。这些资料还是需要找英文的,MD,中文里就找不到类似的资料 。。。真TMD狗屎

Tags: 推送

关于DELL iDRAC6 远程管理卡的区别

单位的R710在莫莫的折腾下终于装好了,由于他装我配置了remote controller,所以兴冲冲的去看了一下,结果没有找到想象中的KVM的图形界面,找了半天也没有找到,所有的菜单都点过来了。。。

最后在网上找到了一些资料,发现:

XML/HTML代码
  1. Remote console/KVM is a capability of the iDRAC 6 Enterprise.  iDRAC 6 Express has no such capabilities.  Here’s a quote from a webcast transcript on DellTechCenter.com:  
  2.   
  3. iDRAC 6 Express is offered as an upgrade on 200–500 series servers and is standard on the 600–900 series. iDRAC 6 is a physical riser card that needs to be added to the server. iDRAC 6 Express offers many remote management features such as an out-of-band Web GUI, advanced security features, several remote management features, power management, and sensor monitoring and alerting  
  4.   
  5. iDRAC 6 Enterprise is offered as an upgrade on 200–900 series servers and is standard on blade servers. iDRAC 6 provides additional out-of-band features including virtual console, virtual media, and a dedicated NIC. iDRAC 6 Enterprise is a physical riser card that provides two additional ports on the back of the server: a RJ-45 network port and an SD slot (for VFlash media)  
  6.   
  7. Hope this helps.”  

好吧,原来express是啥也没有的,我算是明白了,以后要选enterprise了。两者的具体区别可以看这里:http://content.dell.com/cn/zh/enterprise/d/help-me-choose/hmc-server-idrac6-cn.aspx,原来还有一种vFlash.....

Tags: dell, idrac6