Boxerman Posted October 24, 2011 Share Posted October 24, 2011 Hi all, Currently using IIS7 and im trying to rewrite my script but im confused. i want news.php?id=* turned into /news/title-stored-in-database/ but i have no idea about rewriting and on the IIS website its all a little too confusing. Can someone point me the right way please Quote Link to comment https://forums.phpfreaks.com/topic/249704-rewriting/ Share on other sites More sharing options...
ManiacDan Posted October 24, 2011 Share Posted October 24, 2011 I think you're thinking about this backward. Inbound links will be in the format of www.yoursite.com/12345-The-Article-Title-Here Your rewrite rule will ignore the title entirely and just use the ID (12345 in this case). Your rewrite rules cannot access the database. You would print out links to your site in the "pretty" format and then the rule takes the pretty format, strips out everything but the ID, and uses it. -Dan Quote Link to comment https://forums.phpfreaks.com/topic/249704-rewriting/#findComment-1281756 Share on other sites More sharing options...
Boxerman Posted October 26, 2011 Author Share Posted October 26, 2011 I see so would i set up an inbound or outbound rule? Quote Link to comment https://forums.phpfreaks.com/topic/249704-rewriting/#findComment-1282384 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.