etrader Posted July 7, 2009 Share Posted July 7, 2009 I wish to redirect http://domain.com/index.php?something=something&something=something&something=KEYWORD to http://domain.com/KEYWORD The original url is generated by Joomla CMS, but I do not want to use available SEF extentions; just want to make this simple redirection via .htaccess Thanks Quote Link to comment https://forums.phpfreaks.com/topic/165042-please-help-for-a-simple-redirection/ Share on other sites More sharing options...
lifetalk Posted July 26, 2009 Share Posted July 26, 2009 And do you mean to say that the rest of the something=something will always be the same? Quote Link to comment https://forums.phpfreaks.com/topic/165042-please-help-for-a-simple-redirection/#findComment-883122 Share on other sites More sharing options...
etrader Posted July 26, 2009 Author Share Posted July 26, 2009 Yes, they are variables in Joomla CMS, but in my case they are always constant Quote Link to comment https://forums.phpfreaks.com/topic/165042-please-help-for-a-simple-redirection/#findComment-883449 Share on other sites More sharing options...
JsusSalv Posted July 27, 2009 Share Posted July 27, 2009 Try this: RewriteRule ^([a-zA-Z0-9_-]+)/?$ index.php?something=something&something=something&something=$1 [L] I normally use the following: RewriteRule ^([a-zA-Z0-9_-]+)/?$ index.php?xxxxxxxx=$1 [L] so it rewrites to domain.com/xxxxxxxx I know you have some extra variables in the query string but it should, hopefully, work the same. Just keep in mind that [a-zA-Z0-9_-] will only allow alphanumeric characters plus the underscore and hyphen. Modify this to accomodate for your allowed characters. Quote Link to comment https://forums.phpfreaks.com/topic/165042-please-help-for-a-simple-redirection/#findComment-883794 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.