LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 06-09-2009, 08:58 PM   #1
jon_k
Member
 
Registered: Jul 2003
Location: Fort Worth, Texas
Distribution: Mepis Linux 2004
Posts: 547

Rep: Reputation: 30
Linux Apache Rewrite Rule


Interesting issue here.

I have this under a vhost along with many other rewritecond's that work fine.

<code>
RewriteEngine on
rewritecond %{query_string} page_id=20 [nc]
rewriterule ^(.*)$ http://newurl.com [r=301,nc]
</code>

This doesn't seem to work after reloading Apache's config. According to documentation, this should work; any ideas?
 
Old 06-10-2009, 03:09 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,975

Rep: Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343Reputation: 1343
It works indeed.
How do you test it? You should use something like: http://vhost.com/index.html?page_id=20 and see if it redirects you to http://newurl.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
Apache rewrite rule help - dynamic url to static page DukeLeto Linux - Software 3 11-12-2008 12:26 PM
apache rewrite rule to lighttpd's. error!!! gavin2u Linux - Server 0 08-12-2008 01:18 AM
Subdomains with Apache 2.2.3 - vhost or rewrite rule? Serapis Linux - Server 8 01-25-2008 05:28 AM
Apache rewrite rule help kinetik Linux - Software 1 11-05-2007 12:18 PM
Help me make this rewrite rule in Apache ganninu Linux - General 8 01-07-2004 09:30 AM


All times are GMT -5. The time now is 01:06 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration