htaccess的重定向example.com/index.php到example.com/home~~V [英] htaccess redirect example.com/index.php to example.com/home

查看:132
本文介绍了htaccess的重定向example.com/index.php到example.com/home~~V的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此先感谢,我想重定向人谁类型example.com或example.com/index.php到example.com/home~~V

Thanks in advance, I am trying to redirect anyone who types in example.com or example.com/index.php to example.com/home

请让我知道,我已经尝试了永久重定向和301的的htaccess的规则,他们都没有奏效。我的页面是动态创建的。

Please let me know, I have tried the htaccess rules of redirect permanent and 301's and they have not worked. My pages are created dynamically.

推荐答案

首先,确保你的语法是正确的。这是你的.htaccess文件看起来像?

First, make sure your syntax is correct. Is this what your .htaccess file looked like?

Redirect 301 / http://example.com/home
Redirect 301 /index.php http://example.com/home

如果你确定,试试这个:

If you're sure, try this:

RewriteEngine on
RewriteBase /
RewriteRule ^& http://example.com/home [L,R=301] 
RewriteRule index.php http://example.com/home [L,R=301]

这篇关于htaccess的重定向example.com/index.php到example.com/home~~V的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆