2012-11-16 2 views
0

내 로컬 시스템에 xampp이 설치되어 있습니다. 나는 codeigniter로 응용 프로그램을 만들고 있는데 그 사이에 index.php를 생략하고 싶습니다..htaccess와 codeigniter가 포함 된 xampp 스플래시 화면 받기

<IfModule mod_rewrite.c> 

RewriteEngine On 
RewriteBase/

### Canonicalize codeigniter URLs 

# If your default controller is something other than 
# "welcome" you should probably change this 
#RewriteRule ^(welcome(/index)?|index(\.php)?)/?$/[L,R=301] 
#RewriteRule ^(.*)/index?$ $1 [L,R=301] 

# Removes trailing slashes (prevents SEO duplicate content issues) 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.+)/$ $1 [L,R=301] 

# Enforce www 
# If you have subdomains, you can add them to 
# the list using the "|" (OR) regex operator 
RewriteCond %{HTTP_HOST} !^(www|subdomain) [NC] 
RewriteRule ^(.*)$ http://localhost/masalewala/$1 [L,R=301] 

# Enforce NO www 
#RewriteCond %{HTTP_HOST} ^www [NC] 
RewriteRule ^(.*)$ http://www.localhost/masalewala/$1 [L,R=301] 

### 

# 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] 

# 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] 

에 접속 URL : 여기

http://www.farinspace.com/codeigniter-htaccess-file/ 여기에서 내 htaccess로 파일입니다 로컬 호스트/masalewala/아무것도, 파이어 폭스 나에게주는 다음 :

"Firefox가 서버가이 주소에 대한 요청을 완료되지 않는 방식으로 리디렉션 중임을 감지했습니다."

어떤 CLUES입니까?

답변

0

.htaccess 파일에 모두 필요하지는 않습니다. 이것을 사용해보십시오. 내가 사용하는 것 :

Options FollowSymLinks 
<IfModule mod_rewrite.c> 
    RewriteEngine on 

    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php?/$1 [L] 
</IfModule> 
<IfModule !mod_rewrite.c> 
    ErrorDocument 404 /index.php 
</IfModule>