htaccess的重定向example.com/index.php到example.com/home~~V

编程入门 行业动态 更新时间:2024-10-24 10:21:56
本文介绍了htaccess的重定向example/index.php到example/home~~V的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

Thanks in advance, I am trying to redirect anyone who types in example or example/index.php to example/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 / example/home Redirect 301 /index.php example/home

如果你确定,试试这个:

If you're sure, try this:

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

更多推荐

htaccess的重定向example.com/index.php到example.com/home~~V

本文发布于:2023-11-01 11:36:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549236.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重定向   htaccess   index   home   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!