Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/292.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 主页未从codeigniter项目加载_Php_.htaccess_Codeigniter - Fatal编程技术网

Php 主页未从codeigniter项目加载

Php 主页未从codeigniter项目加载,php,.htaccess,codeigniter,Php,.htaccess,Codeigniter,我使用的是WAMPPServer2.5,我把这个项目放在了www文件夹下。我可以在项目部分的本地主机中找到它。单击后,主页的链接将显示在地址栏中,但页面显示: 找不到 在此服务器上找不到请求的URL/fr/home/ 该项目正在live server中顺利运行。链接是: 但是它没有在我的本地服务器上运行。我尝试过很多事情,但我的挫折感不断增加。我的其他CI项目在wampp服务器中运行得非常顺利。我使用.htaccess文件效率不高 以下是.htaccess文件: <IfModule mod

我使用的是WAMPPServer2.5,我把这个项目放在了www文件夹下。我可以在项目部分的本地主机中找到它。单击后,主页的链接将显示在地址栏中,但页面显示:

找不到 在此服务器上找不到请求的URL/fr/home/

该项目正在live server中顺利运行。链接是:

但是它没有在我的本地服务器上运行。我尝试过很多事情,但我的挫折感不断增加。我的其他CI项目在wampp服务器中运行得非常顺利。我使用.htaccess文件效率不高

以下是.htaccess文件:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    SetEnv APP_ROOT

    AddType text/css .css
    AddType text/richtext .rtf .rtx
    AddType image/svg+xml .svg .svgz
    AddType text/plain .txt
    AddType text/xsd .xsd
    AddType text/xsl .xsl
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip

    RewriteRule ^accueil/?$ fr/home/ [L]
    RewriteRule ^home/?$ en/home/ [L]

        RewriteRule ^fureteur/?$ fr/error/fallback [L]
        RewriteRule ^browser/?$ en/error/fallback [L]

        RewriteRule ^plan-du-site/?$ fr/home/sitemap [L]
        RewriteRule ^sitemap/?$ en/home/sitemap [L]

    RewriteRule ^projets/?$ fr/projets/ [L]
    RewriteRule ^projects/?$ en/projets/ [L]        

    RewriteRule ^projets2/?$ fr/projets/portfolio_hover [L]
    RewriteRule ^projects2/?$ en/projets/portfolio_hover [L]        

    RewriteRule ^projets/thegirls?$ fr/projets/thegirls [L]
    RewriteRule ^projects/the-girls?$ en/projets/thegirls [L]       

    RewriteRule ^projets/thegirls2?$ fr/projets/thegirls2 [L]
    RewriteRule ^projects/the-girls2?$ en/projets/thegirls2 [L]     

    RewriteRule ^projets/template?$ fr/projets/template [L]
    RewriteRule ^projects/template?$ en/projets/template [L]        

    RewriteRule ^projets/groupe-atis?$ fr/projets/atis [L]
    RewriteRule ^projects/atis-group?$ en/projets/atis [L]      

    RewriteRule ^projets/olympic?$ fr/projets/olympic [L]
    RewriteRule ^projects/olympic?$ en/projets/olympic [L]      

    RewriteRule ^projets/leche-desserts?$ fr/projets/lechedesserts [L]
    RewriteRule ^projects/leche-desserts?$ en/projets/lechedesserts [L]     

    RewriteRule ^projets/parker-legal?$ fr/projets/parkerlegal [L]
    RewriteRule ^projects/parker-legal?$ en/projets/parkerlegal [L]     

    RewriteRule ^services/?$ fr/service/ [L]
    RewriteRule ^our-services/?$ en/service/ [L]        

    RewriteRule ^contactez-nous/?$ fr/contact/ [L]
    RewriteRule ^contact-us/?$ en/contact/ [L]      

    RewriteRule ^bienvenue/?$ fr/welcome/ [L]
    RewriteRule ^welcome/?$ en/welcome/ [L]     

    RewriteRule ^erreur/erreur_404/?$ fr/errors/error_404 [L]
    RewriteRule ^error/error_404/?$ en/errors/error_404 [L]     

    RewriteRule ^upload/?$ fr/upload/ [L]
    RewriteRule ^uploaded/?$ en/upload/[L]      

    RewriteRule ^upload/do_upload?$ fr/upload/do_upload [L]
    RewriteRule ^uploaded/do_upload?$ en/upload/do_upload[L]    



    RewriteRule ^emplois/?$ fr/job [L]
    RewriteRule ^jobs/?$ en/job [L] 



    RewriteRule ^admin/login?$ fr/auth/login [L]
    RewriteRule ^admin/do_login?$ en/auth/login[L]  

    RewriteRule ^admin/enregistrer?$ fr/auth/register [L]
    RewriteRule ^admin/register?$ en/auth/register[L]   

    RewriteRule ^admin/oublie_password?$ fr/auth/forgot_password [L]
    RewriteRule ^admin/forgot_password?$ en/auth/forgot_password[L] 

    RewriteRule ^admin/second_envoi?$ fr/auth/send_again [L]
    RewriteRule ^admin/send_again?$ en/auth/send_again[L]   

    RewriteRule ^admin/reset_pass?$ fr/auth/reset_password [L]
    RewriteRule ^admin/reset_password?$ en/auth/reset_password[L]   

    RewriteRule ^admin/change_pass?$ fr/auth/change_password [L]
    RewriteRule ^admin/change_password?$ en/auth/change_password[L] 

    RewriteRule ^admin/change_courriel?$ fr/auth/change_email [L]
    RewriteRule ^admin/change_email?$ en/auth/change_email[L]   

    RewriteRule ^admin/reset_courriel?$ fr/auth/reset_email [L]
    RewriteRule ^admin/reset_email?$ en/auth/reset_email[L] 

    RewriteRule ^admin/desinscrire?$ fr/auth/unregister [L]
    RewriteRule ^admin/unregister?$ en/auth/unregister[L]   

    RewriteRule ^admin/logout/?$ fr/auth/logout [L]
    RewriteRule ^admin/do_logout/?$ en/auth/logout[L]       

    RewriteRule ^emplois/gestion/?$ fr/adminjob/gestion [L]
    RewriteRule ^jobs/gestion/?$ en/adminjob/gestion [L]    

    RewriteRule ^emplois/creation/?$ fr/adminjob/creation [L]
    RewriteRule ^jobs/creation/?$ en/adminjob/creation [L]  

    RewriteRule ^emplois/modification/?$ fr/adminjob/modification [L]
    RewriteRule ^jobs/modification/?$ en/adminjob/modification [L]  


    RewriteRule ^stability/?$ fr/stability [L]
    RewriteRule ^en_stability/?$ en/stability [L]   

    RewriteRule ^stability/test/?$ fr/stability/guigz [L]
    RewriteRule ^en_stability/test/?$ en/stability/guigz [L]        

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php/$1 [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,QSA]
</IfModule>

<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A2628000
    ExpiresByType text/richtext A3600
    ExpiresByType image/svg+xml A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xsd A3600
    ExpiresByType text/xsl A3600
    ExpiresByType video/asf A2628000
    ExpiresByType video/avi A2628000
    ExpiresByType image/bmp A2628000
    ExpiresByType application/java A2628000
    ExpiresByType video/divx A2628000
    ExpiresByType application/msword A2628000
    ExpiresByType application/x-msdownload A2628000
    ExpiresByType image/gif A2628000
    ExpiresByType application/x-gzip A2628000
    ExpiresByType image/x-icon A2628000
    ExpiresByType image/jpeg A2628000
    ExpiresByType application/vnd.ms-access A2628000
    ExpiresByType audio/midi A2628000
    ExpiresByType video/quicktime A2628000
    ExpiresByType audio/mpeg A2628000
    ExpiresByType video/mp4 A2628000
    ExpiresByType video/mpeg A2628000
    ExpiresByType application/vnd.ms-project A2628000
    ExpiresByType application/vnd.oasis.opendocument.database A2628000
    ExpiresByType application/vnd.oasis.opendocument.chart A2628000
    ExpiresByType application/vnd.oasis.opendocument.formula A2628000
    ExpiresByType application/vnd.oasis.opendocument.graphics A2628000
    ExpiresByType application/vnd.oasis.opendocument.presentation A2628000
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A2628000
    ExpiresByType application/vnd.oasis.opendocument.text A2628000
    ExpiresByType audio/ogg A2628000
    ExpiresByType application/pdf A2628000
    ExpiresByType image/png A2628000 
    ExpiresByType application/vnd.ms-powerpoint A2628000
    ExpiresByType audio/x-realaudio A2628000
    ExpiresByType application/x-shockwave-flash A2628000
    ExpiresByType application/x-tar A2628000
    ExpiresByType image/tiff A2628000
    ExpiresByType audio/wav A2628000
    ExpiresByType audio/wma A2628000
    ExpiresByType application/vnd.ms-write A2628000
    ExpiresByType application/vnd.ms-excel A2628000
    ExpiresByType application/zip A2628000
</IfModule>

AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript

<FilesMatch "\.(css|CSS|)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    </IfModule>
</FilesMatch>
<FilesMatch "\.(rtf|rtx|svg|svgz|txt|xsd|xsl|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    </IfModule>
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpg|jpeg|​jpe|mdb|mid|midi|

mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods​|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|

tif|tiff|wav|wma|wri|xla|xls|xl​sx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|DOC|DOCX|EXE|GIF|GZ|GZIP|I​

CO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V|MPEG|MPG|MPE|MPP|ODB|ODC|ODF​|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|

PPS|PPT|PPTX|RA|RAM|SWF|TAR|TIF|TIFF|WAV|WMA|WR​I|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
    <IfModule mod_headers.c>
         Header set X-Powered-By "Step by Step guide to speed up your VB4 (forum only)"
    </IfModule>
</FilesMatch>
config.php文件是:

<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
date_default_timezone_set('America/Montreal');

$config['base_url'] = '';

$config['index_page'] = '';
/
$config['uri_protocol'] = 'ORIG_PATH_INFO';


$config['url_suffix'] = '';

$config['language'] = 'english';

$config['charset'] = 'UTF-8';


$config['enable_hooks'] = FALSE;


$config['subclass_prefix'] = 'MY_';


$config['allow_get_array']      = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger']   = 'c';
$config['function_trigger']     = 'm';
$config['directory_trigger']    = 'd'; // experimental not currently in use

$config['log_threshold'] = 0;

$config['log_path'] = '';


$config['log_date_format'] = 'Y-m-d H:i:s';


$config['cache_path'] = '';


$config['encryption_key'] = 'n!yzm%;l+{Qug&:S)WJJ!M_5P;6oyt0$';


$config['sess_cookie_name']     = 'example_session';
$config['sess_expiration']      = 7200;
$config['sess_expire_on_close'] = FALSE;
$config['sess_encrypt_cookie']  = FALSE;
$config['sess_use_database']    = TRUE;
$config['sess_table_name']      = 'ci_sessions';
$config['sess_match_ip']        = FALSE;
$config['sess_match_useragent'] = TRUE;
$config['sess_time_to_update']  = 300;


$config['cookie_prefix']    = "";
$config['cookie_domain']    = "";
$config['cookie_path']      = "/";
$config['cookie_secure']    = FALSE;


$config['global_xss_filtering'] = FALSE;

$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;

$config['compress_output'] = FALSE;

$config['time_reference'] = 'local';


$config['rewrite_short_tags'] = FALSE;

$config['proxy_ips'] = '';

请删除不可用的代码useful@ZiTAL问题是,我不知道需要.htaccess的哪一部分以及原因。在我以前的项目中,我从未在.htaccess文件中使用过这么多代码。但这不是我的项目,但我必须努力。最糟糕的是,它可以在实时服务器上完美运行。只是不在我的wampp服务器中。