LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Linux Apache Rewrite Rule (http://www.linuxquestions.org/questions/linux-software-2/linux-apache-rewrite-rule-731791/)

jon_k 06-09-2009 08:58 PM

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?

bathory 06-10-2009 03:09 AM

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.


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