0
我們的開發環境在工作時使用帶apache/php的單個centos機器,爲CIFS掛載的和本地目錄提供不同的虛擬主機。我們的應用程序使用CodeIgniter的2.0CodeIgniter路由通過CIFS掛載工作,但不通過本地文件
我們最近做了一個改變我們的路線是爲服務安裝的驅動器上的虛擬主機工作正常建,但是路線不能被解析爲本地文件,造成404
$config['base_url'] = "http://production.host.com"; // the production value of $_SERVER['SERVER_NAME'] essentially
路線:
$route['companyone'] = 'sso/platformsso/requestgenericsso/companyone';
$route['companyone/(:any)'] = 'sso/ptlatformsso/requestgenericsso/companyone/$1';
這適用於以下情形:
<VirtualHost 192.168.1.1:80>
ServerAdmin [email protected]
DocumentRoot "/var/mnt/a"
ServerName "a.tmbc.com"
ErrorLog logs/a.error.log
Alias ssaml /var/simplesamlphp/www
</VirtualHost>
<Directory "/var/mnt/a">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Directory populated using CIFS mount: mount -t cifs //1.2.3.4/a /var/mnt/a -o rw,username=un,password=pwd,uid=48 --verbose1
但這種情況下不工作:
<VirtualHost 192.168.1.1:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/html/b"
ServerName "b.host.com"
ErrorLog logs/b.error.log
Alias ssaml /var/simplesamlphp/www
</VirtualHost>
<Directory "/var/www/html/b">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Directory populated using SVN checkout: svn checkout file:///var/svn/repo/trunk /var/www/html/b
的.htaccess:
AddType text/x-component .htc
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
# Restrict unused HTTP methods
RewriteCond %{REQUEST_METHOD} !^(GET|POST|HEAD)
RewriteRule .* - [R=405,L]
# Forces SSL
RewriteCond %{HTTPS} !=on
RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
#Removes access to the system folder by users.
RewriteCond %{REQUEST_URI} ^_sys.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_URI} ^_app.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteRule ^(.*).(pdf|exe|doc|mp4)$ /externaldownload/?fileLocation=$1.$2 [R,L]
#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
的爲什麼會是這樣的任何想法?
只有一個規則在那裏,你可以分享你的虛擬主機文件,你的'$配置[」 base_url']'設置? – PoX
添加了該信息。 thx的幫助@PoX –
我認爲你有rewritemod/htaccess相關的問題檢查這些或在這裏分享,我們可能會有所幫助。根據服務器名稱,我認爲它的 – PoX