簡體   English   中英

htacess用於帶有wordpress安裝的根文件夾和另一個域的子目錄

[英]htacess for root folder with wordpress install and subdirectory for another domain

我在我的網站目錄中安裝了一個wordpress安裝程序,例如(public_html / wp-content,public_html / wp-admin,public_html / wp-includes),並且我有一個子目錄指向另一個域public_html / anotherdomain.com

我不想讓另一個域搞亂root wordpress安裝。 例如 anotherdomain.com僅應訪問public_html / anotherdomain.com,originialdomain.com應訪問public_html文件夾(不包括anotherdomain.com)。

我的問題是最好的方法是什么?

  1. 使用htaccess嗎?
  2. 使用cpanel插件域並為wordpress安裝創建子目錄?

如果您使用.htaccess,則可以阻止您從wordpress網站訪問anotherdomain.com。 這是可行的,但有點草率,並不能很好地計划未來。 當您獲得更多域並安裝它們時,是否要繼續執行此操作?

我認為您在數字2中所說的是更干凈的方法。給WordPress網站一個自己的目錄,該目錄與anotherdomain.com對等。 這樣,如果您擁有1個,2個或10個域,則其工作原理相同。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM