当前位置: 动力学知识库 > 问答 > 编程问答 >

url redirection - URL redirect on homepage of wordpress theme

问题描述:

I'm using a particular wordpress theme (Pluto) to make a site. When I go to my domain - www.tastersclubwhiskeyofthemonth.com , the homepage displays no content until you hit one of the menu items.

How can I get my homepage to default to a specific menu item @ www.tastersclubwhiskeyofthemonth.com/#whiskey-of-the-month

I tried using the typical HTML redirect, but it doesn't work with my site - maybe because all my urls have # after the .com, or maybe because it's a wordpress site?:

<meta http-equiv="REFRESH" content="0;url=http://www.tastersclubwhiskeyofthemonth.com/#whiskey-of-the-month"> but it doesn't work.

Any idea how I can do this?

网友答案:

Create a htaccess mod rewrite rule. Add this to your htaccess file

RewriteEngine On
RewriteCond %{HTTP_HOST} ^something\.com
RewriteRule (.*) http://.something.com/#something2 [R=301,L]
分享给朋友:
您可能感兴趣的文章:
随机阅读: