Mod rewrite only domain name display on url?


my link

i want to when i click in alink url be or i dont want to show parameters in url.

how can i do itis with mod_Rewrite , apache or php.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Save the file as .htaccess and place it on your root directory.
RewriteEngine On
RewriteBase /
RewriteRule ^(.+)/([0-9]+)/?$ user_detail.php?category_id=$1&user_id=$2
phparmyAuthor Commented:
but i need for all of my pages be like that not for specific pages.

sometimes can be  user_detail.php?id=1&category_id=2&name=Joe&exc.... or products.php?a=1&b[2]=1

Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

Use multiple rewrite rule according to your need
For this question to be answered you first need to have your requirements finalized.

Do you not want parameters in the url, or just not as a query string(query string is the questionmark and anything after: page.php?variables)

What are your preferred urls? Can you specify them?

1){username} --> maps to user.php?username=username
2){username} --> maps to profiles.php?username=username
3) ... etc

Kind regards



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
phparmyAuthor Commented:
i dont want to show query string in url.  i want clean only nothing user can see in url. is it possible.

i see it in .net projects. there is nothing on url. but site works correctly.
You would have to use only POST request i guess or AJAX/Flash/Flex.
I think Roonan is correct. Create a frontpage and use Ajax or Flex Technology, or use an Iframe.
phparmyAuthor Commented:
i have solution for that. i encrypt urls and then again decrypt it for use.  mcrypt extension is good for that. but i am searching for like in .net projects when clicking any link you see its information in window.status but urls are clean. how they do it. is it posibble to do with mod_rewrite.  i dont want to use ajax and frame.
phparmyAuthor Commented:
Thanks everybody i cant found any solution. I will open this question later.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.