字preSS如何从所有页面首页强制重定向 [英] wordpress how to force redirection from all pages to home

查看:140
本文介绍了字preSS如何从所有页面首页强制重定向的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个单页的字preSS网站。它使用的网页和帖子,但所有的编程包括在核心模板。我不希望用户曾经不小心访问单个职位(即使它是不可能的,会不会发生)。我想preFER不必须使用404或者模板,所以这将是巨大的,每一个页面重定向到主页。难道这不容易使用默认的.htaccess规则的干扰呢?

I have a one-page wordpress site. It uses pages and posts but is all programatically included in the core template. I don't want users to ever accidentally access a single posts (even though it's unlikely that would ever happen). I would prefer to not have to use a 404 template either so it would be great to redirect EVERY page to the home page. Is this easily done without interfering with the default .htaccess rules?

推荐答案

我最终使用的这个插件并手动重定向每一页,从而留下无关的网页上抛出一个404错误。这不是我想要的东西,但最终这是最好的做法。

I ended up using this plugin and redirecting each page manually, thus leaving irrelevant pages to throw a 404 error. It's not what I wanted but in the end it's best practice.

这篇关于字preSS如何从所有页面首页强制重定向的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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