2014-01-06 124 views
0

這就是我現在的.htaccess文件中的內容。 現在我想消除我的url中的index.php。我該怎麼做呢? 我從這個網站嘗試了幾種可能性,但是我得到一個500內部錯誤或根本沒有任何改變。從url中刪除index.php

# SEO URL Settings 
RewriteEngine On 
# If your opencart installation does not run on the main web folder make sure you folder             it does run in ie./becomes /shop/ 

RewriteBase/
RewriteRule ^sitemap.xml$ index.php?route=feed/google_sitemap [L] 
RewriteRule ^googlebase.xml$ index.php?route=feed/google_base [L] 
RewriteRule ^download/(.*) /index.php?route=error/not_found [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteCond %{REQUEST_URI} !.*\.(ico|gif|jpg|jpeg|png|js|css) 
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA] 

回答

0

下面的代碼將重寫的index.php索引

RewriteEngine on 
RewriteRule ^index index.php 
0

嘗試,如果這個工程

Options +FollowSymLinks -Indexes 
RewriteEngine on 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 

<IfModule mod_php5.c> 
    RewriteRule ^(.*)$ index.php/$1 [L] 
</IfModule>