popcornplya Posted July 19, 2009 Share Posted July 19, 2009 I need to rewrite http://example.com/index.php?r=something to http://example.com/something in htaccess sorry if this is the wrong forum but any help? Quote Link to comment https://forums.phpfreaks.com/topic/166542-helps/ Share on other sites More sharing options...
.josh Posted July 19, 2009 Share Posted July 19, 2009 google for mod rewrite tutorials. Virtually every single one of them out there shows how to do that. Quote Link to comment https://forums.phpfreaks.com/topic/166542-helps/#findComment-878266 Share on other sites More sharing options...
popcornplya Posted July 19, 2009 Author Share Posted July 19, 2009 I've done that.. but when I do Options +FollowSymlinks RewriteEngine on RewriteRule ^(.*) /index.php?r=$1 [NC] it wont work Quote Link to comment https://forums.phpfreaks.com/topic/166542-helps/#findComment-878276 Share on other sites More sharing options...
dpacmittal Posted July 21, 2009 Share Posted July 21, 2009 Try This: Options +FollowSymlinks RewriteEngine on RewriteRule (.*) /index.php?r=$1 [NC] Or this: Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC] RewriteRule ^(.*)$ http://www.example.com/index.php\?r=$1 Quote Link to comment https://forums.phpfreaks.com/topic/166542-helps/#findComment-879185 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.