Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose user goes to It must show, keeping the url intact. How to do that with .htaccess?


RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.site\.com/feeds$ [NC]
RewriteRule ^(.*)$ [R=301,L]

404 with this?! [contacted my admin about this, second, maybe a system thing]

RewriteEngine On
RewriteRule ^/feeds$ index.html [P]
share|improve this question
up vote 1 down vote accepted

Since it's an htaccess file, the context path is stripped; remove the leading slashes.

RewriteRule ^feeds$ Layouts/feeds.html [L]
share|improve this answer

If you want to "keep the URL intact", then you're not issuing a redirect, by definition -- a redirect is an instruction to the web browser "please go request this other page".

Instead, what you want is the Proxy flag to your RewriteRule, something like:

RewriteRule ^/feeds$ [P]
share|improve this answer
@womble [P] should just be for external proxying - doesn't work for internal. – Shane Madden Mar 3 '12 at 23:59
Also - good to see you, welcome back! – Shane Madden Mar 4 '12 at 0:08
@hhh Have you gotten rid of that bad RewriteCond? What's the config look like now? – Shane Madden Mar 4 '12 at 0:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.