mathewjenkinson Posted April 29, 2009 Share Posted April 29, 2009 How do I write an expression that allows the user to go to: domain.com/folder/ and be linked to: domain.com/folder/index.php?id=100 ived tried: RewriteRule ^/ index.php?id=100 [L] but no joy. anyone got any suggestions? Thanks Mathew Link to comment https://forums.phpfreaks.com/topic/156170-into-indexphp/ Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted April 30, 2009 Share Posted April 30, 2009 Everyone that go to http://www.domain.com/folder/ Get redirected to : http://www.domain.com/folder/index.php?id=100 That doesn't sound really usefull to me. And why you need mod_rewrite for that task in the first place...why you just don't use that : index.php <?php if (!isset($_GET['id'])) { $id = 100; } else { $id = (int) $_GET['id']; } ... ?> Link to comment https://forums.phpfreaks.com/topic/156170-into-indexphp/#findComment-822344 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.