我需要将非www网址重定向到www网址,用于http和https网址.我尝试在web.config中遵循规则.
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:0}" redirectType="Permanent" />
Run Code Online (Sandbox Code Playgroud)
<rule name="Redirect to WWW https" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTPS}" pattern="^domain.com$" />
</conditions>
<action type="Redirect" url="https://www.domain.com/{R:0}" redirectType="Permanent" />
Run Code Online (Sandbox Code Playgroud)
它适用于非ssl网址,但在ssl的情况下,它从https://domain.com重定向 到http://www.domain.com
请帮我纠正我的规则.
我想在网站上整合facebook登录.使用的代码:
<fb:login-button autologoutlink="true" scope="read_stream,publish_stream,offline_access,email,user_birthday,status_update,user_status,user_hometown,user_location" onlogin="checkFBLoginStatus();">Sign in with Facebook</fb:login-button>
Run Code Online (Sandbox Code Playgroud)
当用户已登录到Facebook并单击此代码生成的按钮时,onlogin中指定的功能甚至会被触发两次.
在fbinit我有
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true, // parse XFBML
oauth: true
Run Code Online (Sandbox Code Playgroud)
和函数checkFBLoginStatus只包含一个警告语句
我正在创建一个joomla系统插件.我想检查当前页面是否正在加载任何文章.
为此,我打算检查视图是否是文章,并在这种情况下获取id.但是,当sef打开时,这不起作用.
有没有办法得到这个.或者如果SEF开启,如何获得非sef网址.