我从我的实时服务器下载了一个网站 . 我想在我的localhost上运行它 . 我将 base_url
更改为我的localhost网址,但这不起作用 . 这是我的 config.php
.
直播网站:
$ config ['base_url'] ='http:// my_site / portal /';
本地主机:
$ config ['base_url'] ='http:// localhost / limo / portal /';
这是我的 .HTACCESS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /portal/
# Removes index.php from ExpressionEngine URLs
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteCond %{REQUEST_URI} !/system/.* [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
# Directs all EE web requests through the site index file
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /portal/index.php?/$1 [L]
</IfModule>
请帮助我,因为这是我在codeigniter中的第一个项目 .
1 回答
将
RewriteBase
更改为/limo/portal/
并从最后RewriteRule
删除/portal/
.