LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2009, 05:51 AM   #1
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Rep: Reputation: 30
apache redirect


hi can some one please help me with redirecting i have tried but still not working
i want to redirect
www.example.com/?id=1234 to
www.example.com

Last edited by mahmoud; 01-13-2009 at 06:21 AM.
 
Old 01-13-2009, 07:39 AM   #2
nidhinmd
Member
 
Registered: Aug 2007
Location: Cochin, Kerala, India
Posts: 32

Rep: Reputation: 3
Did u tried the rewrite rule. May be this link will help u.

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
 
Old 01-13-2009, 08:50 AM   #3
mahmoud
Member
 
Registered: Apr 2006
Location: UK
Distribution: Mandriva, Debain, Redhat, Fedora, Ubuntu, FreeBSD
Posts: 269

Original Poster
Rep: Reputation: 30
yes i tried
RewriteCond %{REQUEST_URI} ^www\.example\.com$
RewriteRule ^/\?id\=(\d+) http://www.example.com/$1 [L,R=301]
didnt work and i tried

RewriteCond %{REQUEST_URI} /www.example\.com$
RewriteCond %{QUERY_STRING} ^id=[^&]+
RewriteRule http://www.example.com/$1 [L,R=301]
 
Old 01-13-2009, 09:59 PM   #4
rajeshkerala
Member
 
Registered: Mar 2008
Posts: 35

Rep: Reputation: 15
I think there is a directive in apache like this:

alias redirect www.example.com/** www.example.com
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with Redirect in Apache kaplan71 Linux - Software 20 10-10-2006 03:09 AM
apache redirect question twk Linux - Networking 2 10-23-2004 02:03 AM
redirect in Apache baslemmens Linux - Networking 6 09-02-2004 01:07 PM
How to redirect apache to tomcat? gepesz Linux - General 0 07-29-2004 10:16 PM
apache redirect? fibbi Linux - Software 7 01-30-2004 11:41 PM


All times are GMT -5. The time now is 12:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration