LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-16-2009, 04:06 AM   #1
b3rkl3y
LQ Newbie
 
Registered: May 2009
Posts: 5

Rep: Reputation: 0
Question Help with redirect rule on apache


Hello, I'm trying to make a redirect rule on my .htaccess but it's not working as planned.

Quote:
RedirectMatch 301 /status/(.*) http://domain.com/$1
RedirectMatch 301 /*tempskin=_rss2 http://domain.com/feed

The first rule works fine, but on the second rule i do have a problem.

When I type http://domain.com/?tempskin=_rss2 the redirect does not work, but if I change the ? to any other character or even group of characters, the redirect works fine. example:

http://domain.com/Atempskin=_rss2 will be redirected to http://domain.com/feed

But i do need to redirect the ?tempskin=_rss2
I already tried some variations on the redirect rule without any success.

Any suggestions?

thanks in advance!
 
Old 07-18-2009, 04:01 PM   #2
carltm
Member
 
Registered: Jan 2007
Location: Canton, MI
Distribution: CentOS, SuSE, Red Hat, Debian, etc.
Posts: 703

Rep: Reputation: 99
The question mark is a special character that means to interpret the
following string(s) as GET variables. I'm pretty sure that's why it's
not working. The only work around I can think of is to change the URL
to something like http://domain.com/content/?tempskin=_rss2 and set
the redirect for /content.
 
  


Reply



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
Need help about redirect of apache! jefix Linux - Server 8 07-06-2009 07:35 AM
Linux Apache Rewrite Rule jon_k Linux - Software 1 06-10-2009 02:09 AM
apache redirect mahmoud Linux - Newbie 3 01-13-2009 08:59 PM
Apache rewrite rule help kinetik Linux - Software 1 11-05-2007 11:18 AM
Help me make this rewrite rule in Apache ganninu Linux - General 8 01-07-2004 08:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:15 PM.

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
Open Source Consulting | Domain Registration