1


Đã tạo thành công file .htaccess rồi, nhưng khi đưa vào web thì lại ko thấy có tác dụng đâu hết? Mình đang sử dụng AppSerV.
Khi thiết kế website, lập trình wesite khá vất vả đấy chứ các bạn nhỉ? chạy được file .htaccess trên localhost của windows cũng là 1 vấn đề lớn đấy. Mặc định .htaccess không chạy trên windows đâu!
Để file .htaccess chạy được trên localhost của windows, bạn cần làm theo thao tác sau:
Bước 1.
Mở file httpd.conf
AppServ/Apache2.2/conf/httpd.conf
Bước 2:
Tìm dòng #LoadModule rewrite_module modules/mod_rewrite.so
Sửa thành LoadModule rewrite_module modules/mod_rewrite.so
Bỏ dấu thăng (#) phía trước, sau đó lưu lại và .... Khởi động lại Apache sẽ có tác dụng
Đơn giản không nào? hy vọng giúp được các bạn.
Great explanation! Many developers overlook that Apache's mod_rewrite is disabled by default on some Windows localhost setups. Enabling the rewrite module and restarting Apache usually resolves the issue. This guide is especially helpful for beginners working with AppServ and .htaccess on Windows. Thanks for sharing this practical solution!