我有一个域名 www.testexample 。当我登录到 www.testexample 时,返回 testexample ;将不显示登录的用户信息。 我知道上述两者都有不同的处理,因此它不保留 www.testexample 访问 testexample a>。
I have a domain say www.testexample. When I login to www.testexample and come back to testexample in browser; the logged in user information is not displayed. I know that the both of the above are treated differently and hence it is not retaining the session for www.testexample while accessing testexample.
请让我知道cakephp是否有办法在TLD上做匹配。因此,每当我输入 testexample 时,都应该为 www.testexample
Please let me know if cakephp has a way to do a match on the TLD. So whenever I type testexample it should take session for www.testexample
我使用以下代码从一个网址重定向到其他
I am using the following code to redirect from one URL to the other
RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ps6309 [NC] RewriteRule ps6309.domain.co.in [L,R=301]这是在我的本地测试机。这有时工作,有时不工作。 此外,我已经添加了rewritelog指令到我的httpd.conf文件。 但日志文件未更新。 如果任何人有任何指示,请让我知道。
this is on my local test machine. This works sometimes and sometimes doesn't. Also I have added the rewritelog directive to my httpd.conf file. But the log file is not getting updated. Please let me know if anyone has any pointers to this.
推荐答案使用.htaccess重定向所有 http:// domain - > www.domain
Use .htaccess to redirect all domain -> www.domain
RewriteCond %{HTTP_HOST} !^www\.domain\ RewriteRule ^(.*)$ www.domain/$1 [R=permanent,L]更多推荐
Www和非www网站
发布评论