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 Quote Link to comment 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']; } ... ?> 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.