簡體   English   中英

想要使用htaccess重寫網址

[英]Want to rewrite url using htaccess

我是htaccess的新手,想做以下事情,

我想重寫網址,

http://example.com/test/test.php to http://example.com/test.html

和我的htaccess文件存在於測試文件夾中。 任何人都可以幫助找出這個問題。

謝謝

應該這樣做:

RewriteEngine on
RewriteRule ^(.*).html$ test/$1.php [QSA]

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM