derrick1123 Posted July 11, 2008 Share Posted July 11, 2008 I want to go from: http://mysite.com/blog/122 To: http://mysite.com/?blog=122 VIA .htaccess _______________________ This is what I have so far (which doesn't exactly work the way I want it to): RewriteEngine on RewriteRule ^blog/([^/\.]+)/?$ index.php?blog=$1 [L] Quote Link to comment Share on other sites More sharing options...
Wolphie Posted July 11, 2008 Share Posted July 11, 2008 Do you mean you want it to go the other way around? I.e. Use Clean URLs? By the way, how is this relevant to the PHP forum? Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted July 11, 2008 Share Posted July 11, 2008 Could you tell me what it's doing that you don't want it to do? RewriteRule ^blog/([0-9]+)$ /index.php?blog=$1 [L] And I agree with Wolphie, this looks like it needs to be in the Apache forum Quote Link to comment Share on other sites More sharing options...
derrick1123 Posted July 11, 2008 Author Share Posted July 11, 2008 I just used .htaccess because that is what I had going. I can't find a way to have: http://mysite.com/index.php?games=packman go to: http://mysite.com/games/packman Nor do I remember what this was called. ??? :-\ By the way, I didn't intend on using .htaccess. My friend suggest I look into it, so that is what I got from it. I rather use PHP. Quote Link to comment Share on other sites More sharing options...
DarkerAngel Posted July 11, 2008 Share Posted July 11, 2008 So you would want something like this? RewriteRule ^(.+)/(.+)$ /index.php?$1=$2 [L] ??? Quote Link to comment Share on other sites More sharing options...
derrick1123 Posted July 11, 2008 Author Share Posted July 11, 2008 I will check this out. Quote Link to comment Share on other sites More sharing options...
derrick1123 Posted November 30, 2008 Author Share Posted November 30, 2008 Sorry, I know I am necroposting, but I just realised this said "CLEAN" lol. This is like anti-clean way of using URLs. 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.