私のワードプレスに問題があります 私のワードプレスはサブドメインにインストールされています。サブドメインはblog.lupinedream.com
となっています。私のプロバイダはそこで行われたリクエストを/public_html/blog/
のディレクトリに転送します。私のランディングページはwww.lupinedream.com
にあり、2つの異なるサブドメイン(forums
とblog
)から選択できます。その情報で、ここに質問があります。.htaccessとWordPress
としても含めて自動転送するすべての要求(、GET
、POST
、PUT
、...などへの適切.htaccess
設定がblog.lupinedream.com
にhttp://www.lupinedream.com/blog
に向け何ですか?私は聞いてるのよ
理由は、ワードプレスでSite URL
とWordPress URL
をに設定 - >一般 WordPressをサブディレクトリにインストールできるようにするには、WordPressの試行時に現在の設定(壊れた画像、GETとPOSTが動作しない)を使用すると変な動作をしています内部ポイント要求はhttp://www.lupinedream.com/blog/
にあります。アドレスバー、私はまた、foobarに行く私のURLに気づいている。
設定:
/public_html/.htaccess
:
Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes
## File Type Specifications
AddType text/html .html .htm .xml
AddType text/plain .txt .text .doc .md .nfo .info
<IfModule mod_cgi.c>
AddHandler cgi-script .cgi .pl .py .jsp .asp .shtml .sh
AddType cgi-script .cgi .pl .py .jsp .asp .shtml .sh
</IfModule>
<iFModule mod_php.c>
AddHandler application/x-httpd-php70 .php .php3 .php4 .php5 .php53 .phtml .tpl .html
AddType application/x-httpd-php70 .php .php3 .php4 .php5 .php53 .phtml .tpl .html
</IfModule>
DirectoryIndex index.html index.php under_construction.html
## Query limits
<Limit GET POST>
Order deny,allow
Deny from All
Allow from All
</Limit>
<Limit PUT DELETE>
Order deny,allow
Deny from All
Allow from localhost
</Limit>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
/public_html/blog/.htaccess
:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
ワードプレス設定>一般:
Site URL
:http://www.lupinedream.com/
WordPress URL
:http://blog.lupinedream.com/
[link](https://codex.wordpress.org/htaccess)のサブドメインの例を使用しましたが、リダイレクトは機能していないようです。 'blog.example.com'に行くと、私はページソースを見ることができます。 blog.example.comを持つものはすべて、 'http:// www.example.com/blog'からアクセスすると、hrefの前に2つの「//」があります。これは、Googleのように外部リンクにも何らかの形で影響するようです。 –
はい、あなたのWordpressサイトは '/ blog'の下にありますか?そして、あなたは既に '/ blog/.htaccess'にこのスニペットを持っています。 –
書き換えルールを '/ public_html/.htaccess'に入れましたか? –