-   Linux - Server (
-   -   Calling all Apache proxy/rewrite gurus (

viGeek 07-27-2010 03:21 PM

Calling all Apache proxy/rewrite gurus
Trying to figure something out and looking for the best way to make it happen.

Working with a friend on a site, we're trying to do a rewrite or proxypass so that we can serve files from another directory at the root level.


We have

In that directory are several files that fit the same naming scheme (i.e file1, file2, file3).

We are wanting to serve these files at the root directory but have them pulled from /directory/

Haven't done this before but have experienced working with Proxypass/Apache and mod_rewrite. My initial assumption was to try...

RewriteBase /directory
RewriteRule ^(.*)$$1

(with options followssymlinks).

Does anyone have a good way to do this?

bathory 07-27-2010 06:52 PM


Try this:

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/directory/
RewriteRule (.*) /directory/$1 [L]

All times are GMT -5. The time now is 11:25 PM.