ahzulfi Posted July 19, 2007 Share Posted July 19, 2007 ??? ??? please tell me how to mod_rewrite this from http://cafepixie.com/songs/songs.php?albumid=$1 $1 = {1,2,3,.....} to http://cafepixie.com/songs/albums/$1/ please tell me the complete procedure... i m totally beginner about mod_rewrite Thank You! ArslanHassan Quote Link to comment Share on other sites More sharing options...
Wuhtzu Posted July 19, 2007 Share Posted July 19, 2007 http://www.phpfreaks.com/tutorials/23/0.php Quote Link to comment Share on other sites More sharing options...
ahzulfi Posted July 19, 2007 Author Share Posted July 19, 2007 ??? :'( didnt get my answer?? i dont have httdocs ??? please tell me how to change it :'( Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 19, 2007 Share Posted July 19, 2007 Create a .htaccess file Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteRule ^songs/albums/([0-9]+)/$ songs.php?albumid=$1 Quote Link to comment Share on other sites More sharing options...
ahzulfi Posted July 23, 2007 Author Share Posted July 23, 2007 ok thanks everyone, i figured the mod_rewrite out, but still got some problems my rewrite rules are RewriteEngine on RewriteRule ^([0-9]+)/([A-Za-z0-9-]+)/?$ songs/songs.php?albumid=$1&name= [L] RewriteRule ^wallpapers/([0-9]+)/([A-Za-z0-9-]+)/?$ wallpapers/wallpapers.php?albumid=$1 [L] the problem is , my images are not loaded for this RULE RewriteRule ^wallpapers/([0-9]+)/([A-Za-z0-9-]+)/?$ wallpapers/wallpapers.php?albumid=$1 [L] you can see it here http://www.cafepixie.com/wallpapers/1/3D please tell me what to do know Thanks Arslan Hassan Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 23, 2007 Share Posted July 23, 2007 From your rewrite do, there's 2 variables, ([0-9]+) => $1 ([A-Za-z0-9-]+) => $2 Double check your rule again, see if anything is missing. Quote Link to comment Share on other sites More sharing options...
ahzulfi Posted July 23, 2007 Author Share Posted July 23, 2007 actualy i dont know anything about mod_rewrite, i just got a hint of writing a rule, therefore i dont have any idea how to firgure out the problem. Thanks Arslan Hassan Quote Link to comment Share on other sites More sharing options...
hackerkts Posted July 24, 2007 Share Posted July 24, 2007 Well, how does your wallpapers.php actually works? You have to ensure your wallpapers.php is working, then you may start writing a mod_rewrite for it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.