Ben Johnson wrote:


On 11/13/2012 4:54 PM, Lester Caine wrote:
Ben Johnson wrote:
My rewrite rules are stored in a config file 'mod_rewrite.conf' which is
loaded in every vhost.d config file. To get this working I've copied
all
the code directly into one of the vhost.conf files and then added the
hard coded paths to the re-write rules.

So now the question is "Is there something I can use to add the vhost
path automatically in the generic config file?"

Well, how did you fix it?! :P

As for your new question, we're not mind-readers... we'd need to see the
mod_rewrite rules to provide a meaningful answer.

lines like
RewriteRule  ^/?wiki/view/(.+)$  /wiki/index.php?page=$1  [L]

have been ammended to

RewriteRule  ^/?wiki/view/(.+)$
/srv/website/eveshamtc.org.uk/wiki/index.php?page=$1  [L]

'A web-path to a resource' is not using the DocumentRoot setting


Right; as you suggested earlier, this seems to be a product of moving
your mod_rewrite rules from .htaccess files to vhost configuration files.

Except that was done for and is working on 2.2 ...

From what I can tell, the only portion of that path that needs to
dynamic is the host name.

I don't know if this will work in that context, but given that your
filesystem structure uses the host name, perhaps you could use
%{HTTP_HOST} in place of "eveshamtc.org.uk", e.g.:

Some domains share the one directory so that one will be difficult in all cases!

RewriteRule ^/?wiki/view/(.+)$
/srv/website/%{$HTTP_HOST}/wiki/index.php?page=$1 [L]

I will give it a try ... although the alternative which Yehuda is pointing towards is to include the generic rewrite script within the <directory> section of the <vhost> section. However there are a group of .conf files loaded for the generic setup, and some of them should not be loaded then. This all seems rather messy when the current set-up works perfectly on 2.2 :(

Currently I just edit the one rewrite config file and update all sites ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to