我看了幾個堆棧溢出問題,從子域刪除index.php url請不要標記爲重複。從子域codeigniter刪除index.php 3
堆棧溢出我已閱讀並嘗試。
CodeIgniter in subdomain folder, removing the index.php from address
remove index.php of codeigniter subdomains
Removing index.php and handling subdomains of two Codeigniter sites, when one within the other
但非似乎我使用WAMP和笨3並啓用MOD重寫工作。我也使用虛擬主機。
Question: What is the best suitable htacces for sub domain so that I can have the index.php remove?
頁錯誤:
codeigniter 500 internal server error
我的文件夾結構
www/
www/codeigniter/cms-1 <-- This is main project
www/codeigniter/cms-1/application
www/codeigniter/cms-1/cms-2 <-- This is sub domain
www/codeigniter/cms-1/cms-2/index.php
www/codeigniter/cms-1/cms-2/.htaccess
www/codeigniter/cms-1/image/
www/codeigniter/cms-1/system
www/codeigniter/cms-1/.htaccess
www/codeigniter/cms-1/index.php
當我有URL上WAMP像下面不起作用。
http://www.cms-2.cms-1.com/information/information/3
但是,當我有index.php的作品。
http://www.cms-2.cms-1.com/index.php/information/information/3
我對application > config > config.php
$config['index_page'] = '';
This .htaccess below is on Main directory and works fine for main domain.
Options +FollowSymLinks
# Prevent Directoy listing
Options -Indexes
# Prevent Direct Access to files
<FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))">
Order deny,allow
Deny from all
</FilesMatch>
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
沒有運氣進入內部服務器錯誤 – user4419336
更新檢查這個現在 –
謝謝您的幫助,我發現了什麼是錯誤的。 + 1 – user4419336