我在我的根目錄中安裝了WP多站點。我目前還有一個網站使用Invision Power的IP內容在這個目錄中運行,但是重命名了index.php文件以適應wordpress。我正在/論壇中運行IP Board。Wordpress主頁獲取重定向到其他CMS主頁
我創建了一個wordpress頁面(domain.tld/sample-page /),但是當瀏覽到它時,它無法找到它(着陸頁不是WP,而是IP內容「我們找不到頁面你正在尋找),看起來我的網站正在查看WP之前的IP內容數據庫,因此無法在其自己的數據庫中找到該頁面/目錄,因爲/ sample-page /不存在於其中,只能在WP數據庫。
當我去domain.com/index.php(應該把我的WP博客)我得到在www.domain.com重定向到我家的IP內容頁。
怎樣纔可以有它看起來像WP數據庫這樣的事情?
我的.htaccess文件:
# Loads home.php first (ip.content). Wordpress is index.php
DirectoryIndex home.php index.php index.html maintenance.html
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !.*\.(jpeg|jpg|gif|png|ico)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /home.php [L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# Multisite
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]
# Multisite
# END WordPress
非常感謝你的回覆。我需要IP內容的第一組條件。我試圖研究添加什麼樣的條件,但沒有提出太多。我確實發現這個線程,這聽起來與我的情況類似:http://stackoverflow.com/questions/3434610/problems-with-wordpress-mod-rewrite-rules-when-requesting-existing-files?rq=1你有什麼想法我需要什麼樣的條件? – myladeybugg
如果您想要WordPress提供特定的頁面,您可以在第一個重寫規則不適用的條件下對其進行命名。 Apache重寫文檔是http://httpd.apache.org/docs/current/mod/mod_rewrite.html –
我試過RewriteEngine RewriteCond%{REQUEST_URI}!^。* /(tools | learn | _)($ | /.*$)[NC] RewriteRule ^(。*)$ /index.php?p = $ 1'但它仍然查看IP內容,然後找不到頁面。如果我正確閱讀我的代碼,它說如果URL不是domain.com/tools或者學習或_然後查看index.php? – myladeybugg