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] Link to comment https://forums.phpfreaks.com/topic/114231-htaccess-clean/ 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? Link to comment https://forums.phpfreaks.com/topic/114231-htaccess-clean/#findComment-587389 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 Link to comment https://forums.phpfreaks.com/topic/114231-htaccess-clean/#findComment-587391 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. Link to comment https://forums.phpfreaks.com/topic/114231-htaccess-clean/#findComment-587392 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] ??? Link to comment https://forums.phpfreaks.com/topic/114231-htaccess-clean/#findComment-587393 Share on other sites More sharing options...
derrick1123 Posted July 11, 2008 Author Share Posted July 11, 2008 I will check this out. Link to comment https://forums.phpfreaks.com/topic/114231-htaccess-clean/#findComment-587394 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. Link to comment https://forums.phpfreaks.com/topic/114231-htaccess-clean/#findComment-702522 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.