2017-02-01 7 views
1

あなたはどうですか?URLに「www」がある場合、私のサブサイトのリダイレクトはメインサイトのホームページを行います

私はワードプレスのマルチサイトを持っており、私のメインページはhttp://www.chablau.com.brとサブサイト(http://chablau.com.br/blog)です。サブサイトのURLが 'www'とともに使用されている場合は、404エラーが返されます。

私は「WWW」なしwww.chablau.com.br/blogするサブサイトのドメイン、URLを変更した場合

eg.: `http://chablau.com.br/blog/` works fine 

    `http://www.chablau.com.br/blog returns` a 404 error 

誰かが何であるかについての手掛かりを持っている主なサイトのホームページに私を送信します起こっている?それ怒鳴る、あなたが私の.htaccessに

# BEGIN WordPress 
<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase/
RewriteRule ^index\.php$ - [L] 

# add a trailing slash to /wp-admin 
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] 

RewriteCond %{REQUEST_FILENAME} -f [OR] 
RewriteCond %{REQUEST_FILENAME} -d 
RewriteRule^- [L] 
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L] 
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L] 
RewriteRule . index.php [L] 
</IfModule> 

# END WordPress 

<FilesMatch "\.(ttf|ttc|otf|eot|woff)$"> 
    <IfModule mod_headers.c> 
     Header set Access-Control-Allow-Origin "*" 
    </IfModule> 
</FilesMatch> 

SetEnvIfNoCase User-Agent "Abonti|aggregator|AhrefsBot|asterias|BDCbot|BLEXBot|BuiltBotTough|Bullseye|BunnySlippers|ca\-crawler|CCBot|Cegbfeieh|CheeseBot|CherryPicker|CopyRightCheck|cosmos|Crescent|discobot|DittoSpyder|DOC|DotBot|Download Ninja|EasouSpider|EmailCollector|EmailSiphon|EmailWolf|EroCrawler|Exabot|ExtractorPro|Fasterfox|FeedBooster|Foobot|Genieo|grub\-client|Harvest|hloader|httplib|HTTrack|humanlinks|ieautodiscovery|InfoNaviRobot|IstellaBot|Java/1\.|JennyBot|k2spider|Kenjin Spider|Keyword Density/0\.9|larbin|LexiBot|libWeb|libwww|LinkextractorPro|linko|LinkScan/8\.1a Unix|LinkWalker|LNSpiderguy|lwp\-trivial|magpie|Mata Hari|MaxPointCrawler|MegaIndex|Microsoft URL Control|MIIxpc|Mippin|Missigua Locator|Mister PiX|MJ12bot|moget|MSIECrawler|NetAnts|NICErsPRO|Niki\-Bot|NPBot|Nutch|Offline Explorer|Openfind|panscient\.com|PHP/5\.\{|ProPowerBot/2\.14|ProWebWalker|Python\-urllib|QueryN Metasearch|RepoMonkey|RMA|SemrushBot|SeznamBot|SISTRIX|sitecheck\.Internetseer\.com|SiteSnagger|SnapPreviewBot|Sogou|SpankBot|spanner|spbot|Spinn3r|suzuran|Szukacz/1\.4|Teleport|Telesoft|The Intraformant|TheNomad|TightTwatBot|Titan|toCrawl/UrlDispatcher|True_Robot|turingos|TurnitinBot|UbiCrawler|UnisterBot|URLy Warning|VCI|WBSearchBot|Web Downloader/6\.9|Web Image Collector|WebAuto|WebBandit|WebCopier|WebEnhancer|WebmasterWorldForumBot|WebReaper|WebSauger|Website Quester|Webster Pro|WebStripper|WebZip|Wotbox|wsr\-agent|WWW\-Collector\-E|Xenu|yandex|Zao|Zeus|ZyBORG|coccoc|Incutio|lmspider|memoryBot|SemrushBot|serf|Unknown|uptime files" bad_bot 
Deny from env=bad_bot 
# END Bad Bot Blocker 

答えて

0

が何であるかを見つけることができると思う問題は、仮想ホストの設定で「ドメインchablau.com.br」を使用しているが、それは「www.chablau.com.brする必要がありますあなたのhtaccessにルールを追加してwww以外のwwwをwwwにリダイレクトすると、あなたの問題は解決されます

+0

あなたの情報、特に.htaccessの洞察力に感謝します。誰かがそれを行う方法を探しているなら、このリンクをチェックしてください。 http://dense13.com/blog/2008/02/27/redirecting-non-www-to-www-with-htaccess/ –

関連する問題