Re: Curious inability to mod_rewrite absolute paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good evening, List,

I apologise for not responding. It's been a busy December and I haven't had 
time to fight with httpd. In response to some comments:

On Sat, Nov 30, 2013 at 12:51 PM, Eric Covener <covener@xxxxxxxxx> wrote:
> You can do that with just Alias if there's no dynamic part.
I may just end up doing this if .htaccess won't let me rewrite paths. I wanted 
to leave apache.conf alone and have a RewriteRule in 
/ClientWork/Drupal/.htaccess instead.

As I understand the documentation, Alias is a specialised RewriteRule. If so, 
why is the latter allowed in .htaccess but the former is not?

On 2 December 2013 13:02:34 Tom Evans wrote:
> He only wants that to happen if the request "originates from"
> /ClientWork/Drupal/ …
I don't remember saying that I wanted to do this. (I guess this is what 
elicited the 'http is a stateless protocol' response). I don't care where the 
request originates from. All I care is that I can put a rule in 
/ClientWork/Drupal/.htaccess that will tell httpd to handle requests to 
"/sites/default/files/..." by retrieving the file at 
"/ClientWork/Drupal/sites/default/files/...".

On 2 December 2013 13:02:34 Tom Evans wrote:
> You can absolutely tell Apache that requests for
> http://localhost/s/d/f/i/ should look in ~/www/CWD/D/s/d/f/i/, what
> you can't do is only do that redirection based upon what URL the
> previous request was.
I'm not sure how I gave the impression that the previous request was relevant 
to rewriting current requests. Perhaps I caused some confusion when I said 
that the links in question were hard-coded into a Drupal website that lived 
under /ClientWork/Drupal. As I mentioned in earlier messages, I can't get any 
variant of "RewriteRule ^/(.*) /ClientWork/Drupal/$1" in 
/ClientWork/Drupal/.htaccess to even catch calls to /sites/default/files/... 
let alone rewrite them.

On 2 December 2013 13:02:34 Tom Evans wrote:
> However, I refuse to believe that Drupal does not have a setting that
> allows you to run it at a particular location and generate the correct
> URLs, which is the correct way forward here.
> Could you ask this question on a drupal list - and not asking "how do
> I redirect XYZ to PQR", but "I installed drupal in /ClientWork/Drupal/
> and it is trying to load files from /sites/default/, what have I
> missed". There may be a required configuration or installation step
> that has been overlooked.
Assuming you get a response on the Drupal fora, it'll typically say "Install 
module X", where X is an arbitrary member of a set of modules, Y, of differing 
levels of stability and maintenance. Even if I can find an X within Y that does 
the job, the links I'm trying to rewrite are hard-coded, so any module would 
still involve having to go back and rewrite each link by hand.

I agree with you: the way forward is using a Drupal solution. Right now, 
though, I need a working clone of the website so I can do the updates and 
testing that I need to do before taking them live. I would rather have one to 
three lines in an .htaccess file work for the time being than to have to pick 
through and fix hundreds of pages.

With thanks,

Borden

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx






[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux