johnsmith153 Posted August 9, 2011 Share Posted August 9, 2011 I am learning mod rewrites and finding it difficult where to start. If someone can show me sample code for the following, I think that will help: (1) Simple redirect when they enter www.site.com/view.html to view the page on the server: www.site.com/pages/view.php (2) Simple redirect like 1 but to append a variable. So they enter www.site.com/jim-brown and I want it to use www.site.com/profile.php?nm=jim-brown I know most people will say I need to learn it myself but this will help me start. Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/ Share on other sites More sharing options...
trq Posted August 9, 2011 Share Posted August 9, 2011 There has to be thousands of tutorials that would cover these simple rules. Have you searched at all? Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1254743 Share on other sites More sharing options...
johnsmith153 Posted August 9, 2011 Author Share Posted August 9, 2011 That's exactly what the problem is (thousands of tutorials). Have you even read my post at all or just trying to bump up your post count figure? Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1254936 Share on other sites More sharing options...
trq Posted August 9, 2011 Share Posted August 9, 2011 Yes I read your post. I just assumed you where being lazy, still do. Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1255083 Share on other sites More sharing options...
ricmetal Posted August 10, 2011 Share Posted August 10, 2011 it's not easy to find an example for the first rule. the tutorials are either very specific or too 'encyclopedia' Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1255102 Share on other sites More sharing options...
AyKay47 Posted August 10, 2011 Share Posted August 10, 2011 That's exactly what the problem is (thousands of tutorials). Have you even read my post at all or just trying to bump up your post count figure? are you married to Pocahontas!?!? That's exactly what the problem is (thousands of tutorials). Have you even read my post at all or just trying to bump up your post count figure? don't disrespect, thorpe has a point Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1255104 Share on other sites More sharing options...
johnsmith153 Posted August 10, 2011 Author Share Posted August 10, 2011 Actually no, I have spent many hours and I'm still struggling on this. The only thing lazy is thorpe's spelling ('where' in this, and many other examples in most of his other posts). Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1255106 Share on other sites More sharing options...
AyKay47 Posted August 10, 2011 Share Posted August 10, 2011 your questions are basic... here are some good examples.. Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1255112 Share on other sites More sharing options...
trq Posted August 10, 2011 Share Posted August 10, 2011 Actually no, I have spent many hours and I'm still struggling on this. The only thing lazy is thorpe's spelling ('where' in this, and many other examples in most of his other posts). Having a dig at me now? Nice. I am well aware that my spelling and grammar are not the best, lucky I'm not a writer. This still changes nothing about the fact that the information you are asking us to provide would be covered in any basic mod_rewrite tutorial. Do you really want us to publish another one just for you? Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1255123 Share on other sites More sharing options...
ricmetal Posted August 10, 2011 Share Posted August 10, 2011 i meant to say that simple rewrite tutorials are not in abundance, point 1 of the OP first post is in abundancy and here is an example http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html enjoy i'd appreciate a link to a tut on a simple url rewrite, if anyone has one. best regards Quote Link to comment https://forums.phpfreaks.com/topic/244280-simple-mod-rewrite/#findComment-1255173 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.