RE: Using Rewrite

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

 



same here,
when i was trying to add this line:

RewriteLog "AA/rewrite.log"

To trace why my rewrite did not work, I got 500 Internal server error.
Any ideas what could be causing it? I tried adding leading slash but no luck... the ath is relative to location of my  .htaccess file.
 
TNX for help 

Date: Thu, 13 Aug 2009 11:37:05 -0600
From: rab4585@xxxxxxxxx
To: users@xxxxxxxxxxxxxxxx
Subject: Re: Using Rewrite

Bob thank you, but i receiving a new error message the http 500 and I do not have access to httpd.conf and also do not know how.

2009/8/12 Bob Ionescu <bobsiegen@xxxxxxxxxxxxxx>
2009/8/12 Alexis <rab4585@xxxxxxxxx>:
> ok, then the code would be
> RewriteCond %{HTTP_HOST} ^files\.example\.com$ [NC] RewriteRule ^(.*)$
> /files/public$1 [L]
> or am i wrong?

Unless you put RewriteEngine off in a .htaccess file located in your
files/public/ folder, that would result in an infinite loop. But only
if you correct your rule. Since there is no leading slash in the
string tested against your regular _expression_ in .htaccess files,
you'd rewrite to /files/publicarchivo.txt instead of
/files/public/archivo.txt

# we can change to a lex. equal comparison here
RewriteCond %{HTTP_HOST} =files.example.com [NC]
# exclude th folder
RewriteCond $1 !^/files/public/
RewriteRule ^(.*) /files/public/$1 [L]


Setting the DocumentRoot for files.example.com in your httpd.conf to
/home/example/public_html/files/public would be another (may be the
regular) approach.

Bob

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




--
Alexis Beltran
skype: blexis.sv
blog: http://blexis.net


Express your personality in color! Preview and select themes for Hotmail®. Try it now.

[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