开发者

Apache: mod_rewrite: generate URL based on passed PArameters

开发者 https://www.devze.com 2023-01-26 08:10 出处:网络
well i have been usestatic mod_rewrite rules for some time now like i used to do this RewriteRule ^Animals\\.html$wallpapers.php?f=Animals&of=0&s=Newest

well i have been use static mod_rewrite rules for some time now like i used to do this

RewriteRule ^Animals\.html$  wallpapers.php?f=Animals&of=0&s=Newest

but now what i want to do is create the URL of the leech pages with开发者_如何学Python keywords... LIKE

preview.php?image=26

preview.php is my leech page & 26 is my imageID(primary key) in the database, which corresponds to a imageName, i want the mod_rewrite to create the page URL using that image name... i have been googling about but could find some usable tutorial... can any one help me learn how to do it?


solved it myself

RewriteRule ^([^/\.]+)/?\.html$ preview.php?image=$1 
0

精彩评论

暂无评论...
验证码 换一张
取 消