2013-02-12 40 views
-1

的mod_rewrite我找不到在笨維基mod_rewrite的了嗎?它去了哪裏?我試圖尋找這個link,但它不是在這裏了。找不到笨

+0

您所選擇的互聯網搜索引擎通常能幫助你搜索。只是注意你是否需要提示如何繼續。 – hakre 2013-02-12 09:36:37

+0

如此多的代碼維基鏈接現在被破壞:( – 2013-02-12 12:29:10

回答

1

mod_rewrite的是Apache Web服務器的一部分,它不是笨的一部分,該擴展使用寫SEO友好的URL

有這個環節,這將有助於你寫的搜索引擎友好的URL上看

SEO friendly urls

檢查的mod_rewrite加載與否只是把空的PHP文件phpinfo()函數調用瀏覽器,文件,然後搜索mod_rewrite的啓用它搜索您的Apache Web服務器的conf目錄下的Apache的httpd.conf,如果它與#評論只需將其刪除並在加載後重新啓動Web服務器即可服務器調用再次phpinofo和搜索mod_rewrite的

1

.htaccess應該是這個樣子:

<IfModule mod_rewrite.c> 
RewriteEngine On 
#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] 
</IfModule> 
<IfModule !mod_rewrite.c> 
ErrorDocument 404 index.php 
</IfModule>