.htaccess is a web server directive file populalrly used in Apache Web Server in Linux / Unix environment. 。 htaccess的是一個Web服務器的指令文件populalrly使用的Apache網絡服務器在Linux / UNIX環境。 In windows environment there is a simple way to enable and use .htaccess.在Windows環境下有一個簡單的方法來啟用和使用。 htaccess的。 Additionally it allows you to create nice permalinks for software like WordPress or phpBB.此外,它可讓您創造尼斯永久性的軟件一樣,在WordPress或phpbb 。

To use .htaccess you need to enable mod_rewrite.使用。 htaccess的您需要啟用mod_rewrite 。 Even with that I didn’t have much success when I separately installed apache web server and php.甚至與我沒有多大的成功,當我分別安裝Apache Web服務器和PHP 。 However if you install XAMPP it is a piece of cake.不過,如果您安裝xampp ,它是一塊蛋糕。

XAMPP automatically installs Apache web server, MySQL database, PHP and a lot of other goodies. xampp自動安裝Apache網絡服務器, MySQL數據庫, PHP和很多其他的東東。 It does not however come with mod_rewrite enabled.它不來,但與mod_rewrite啟用。 Let us assume you installed XAMPP in %XAMPP% directory.讓我們假設您安裝了xampp在% xampp %目錄。 Then you should open %XAMPP%\apache\conf\httpd.conf in notepad and search for mod_rewrite.那麼你應該打開% xampp % \阿帕奇\設置\ httpd.conf中在記事本和搜索mod_rewrite 。 You will find a line like:你會發現一條線,例如:
#LoadModule rewrite_module modules/mod_rewrite.so # loadmodule rewrite_module模塊/ mod_rewrite.so
Remove the # from the beginning.刪除編號從一開始。 It will now look:它現在將看看:
LoadModule rewrite_module modules/mod_rewrite.so loadmodule rewrite_module模塊/ mod_rewrite.so

Restart the Apache web server through XAMPP control panel.重新啟動Apache Web服務器,通過xampp控制面板。 You are done!你這樣做!