1

I need to modify a generated joomla url to another and htaccess seems like a nice way to do this. It's just that I'm not too familiar with it :/

I need to make this url:

http://www.site.com/component/uddeim/?task=new&recip=190&nouserlist=141

Rewritten into this url:

http://www.site.com/community/messages?task=new&recip=190&nouserlist=141

?task=new&recip=190&nouserlist=141 << the number values are dynamic, meaning they change

anyone can help? Thank you...

1 Answer 1

2

Assuming you mean that your end users will enter /component/uddeim/?... into their browsers, use:

RewriteEngine On
RewriteRule ^component/uddeim/? http://example.com/community/messages [L,QSA,R=301]

The QSA flag indicates that the original query string should be appended to the new URL, preserving it in whatever for it may be in.

Sign up to request clarification or add additional context in comments.

4 Comments

it doesn't work :( I still see the old url in the address bar... maybe I explained myself wrong. I mean, the generated link is: site.com/component/uddeim/… I want that when I click the link (or copy and paste it into the browser) it converts in: site.com/community/… PS. Both links work and open the same page.
@user1010703 So you want a redirect, not an invisible rewrite. Since they're the same page, the rewrite rule above would have no visible effect if it is working. Add the [R=301] flag to redirect.
thanks .. it got redirected, but not to the right url.. from this: site.com/component/uddeim/… it got redirected into: site.com/var/www/vhosts/vm1179.cs11.seeweb.it/site.com/… did I do something wrong?
i think i did it! :) RewriteEngine On RewriteRule ^component/uddeim/? site.com/community/messages [L,QSA,R=301] THANK YOU!! ps/i wanted to give you a point for the answer, but it won't let me because i have low reputation :P

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.