【问题标题】:htaccess redirect domain to wordpress page?htaccess 将域重定向到 wordpress 页面?
【发布时间】:2012-10-15 06:30:45
【问题描述】:

我有一个域名页面http://www.domain.com 或 domain.com

我想使用 htaccess 将http://www.domain.com 或 domain.com 重定向到 domain.wordpress.com

我目前有这个:

RewriteOptions inherit
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.domain\.com$
RewriteRule ^/?$ "http\:\/\/domain\.wordpress\.com\/" [R=301,L]

它没有重定向,有人可以帮助我吗?

谢谢!

【问题讨论】:

    标签: wordpress apache .htaccess redirect


    【解决方案1】:
    RewriteEngine on
    
    Options -Indexes
    
    RewriteCond %{HTTP_HOST} ^domain\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$
    RewriteRule ^/?$ "http\:\/\/domain\.wordpress\.com\/" [R=301,L]
    

    它对我有用..希望这会有所帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-01-15
      • 2012-05-07
      • 1970-01-01
      • 2017-08-16
      • 1970-01-01
      • 2010-12-29
      • 2017-12-26
      相关资源
      最近更新 更多