Foster, Stephen (ASPIRE) wrote:
# =
# Rewrite to HTTPS Settings
# =
RewriteCond %{HTTP_HOST} !^online\.domain\.com [NC]
RewriteCond %{HTTP_HOST} !^$
Use lexicographically equal (!="") here instea
hunter wrote:
I will provide details or the fixed files if anyone is interested.
Well, I think that would be useful, if someone steps into the same
problems you had.
--
Robert
-
The official User-To-User support forum of th
Nick Burch wrote:
On Thu, 20 Jul 2006, Neil A. Hillard wrote:
[...]
This is with an internal redirect though, not an external one. No
redirect is sent to the client, it's all handled within apache.
In the rewrite logs, you do get:
applying pattern
applying pattern
old path -> new path
[I
Axel-Stéphane SMORGRAV wrote:
What does that have to do with this particular problem
Well, the answer is simple: I replied to the wrong thread... :-(
--
Robert
-
The official User-To-User support forum of the Apache HTTP
Pieter Vanmeerbeek wrote:
Hi,
I recently upgraded to apache 2.2.2 from 2.0.53.
[...]
In 2.2.2 however for some reason after the re-escaping was done, each % sign
is escaped to %25 before it is sent to the server on the lan. The rewrite
logs (loglevel 9) shows a correctly escaped url which is
Ravish Agarwal wrote:
But my problem is that if I remove [P] tag then every thing works
fine. so do I need to have compile version of mod_proxy.c as the
manual page for apache 1.3 says but its not there at apache 2.0 manual
page. I am using apache 2.0.55
Your problem might result from a change
You can try a neg. lookahead with Apache 2.x
RedirectMatch ^/(?!cgi-bin)(.*)$ http://www.somedomain.com/us/company/en/$1
--
Robert
-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.ap
Eric Lemes wrote:
The problem here is that after the myrepos path, there mustn't be any
changes in the case.
So you need to fine tune the RegEx,
RewriteRule ^/svn/([^/]+)/(.*) /svn/${lower:$1}/$2 [PT]
--
Robert
-
The offici
Eric Lemes wrote:
I need to rewrite a url, translating to lowercase only the repository dir,
in the example:
http://myserver/svn/MyRepos/AnyDirWithAnyCase
This should be translated to
http://myserver/svn/myrepos/AnyDirWithAnyCase.
I tried RewriteRule (\/.*\/.*) ${lowercase:{$1}} [L], but it d
Fenlason, Josh wrote:
I think
it's probably something to do with my mod_rewrite configuration,
If you're using a SSL , be sure to either inherit the rules
from the main server config section with the RewriteOptions directive or
repeat the rules in that virtual host.
--
Robert
-
Axel-Stéphane SMORGRAV wrote:
Could you give some explanations wrt. your RewriteCond ? I have never seen
this kind of expressions before.
Yes. \1 is a regEx internal back reference containing everything matched
in the first group (/test/.+)
So assuming a request of /test/index.html (=value o
Axel-Stéphane SMORGRAV wrote:
Rules below would be tested, but they wouldn't match unless the pattern starts
with scheme + :// + url-path.
unless the RewriteCond pattern starts with /. The above matches just fine.
I meant this hypothetical case
RewriteRule ^/a /b [R]
RewriteRule ^/b /c
Wit
Mariusz Handke wrote:
This wouldn't work (RewriteCond) since $2 and $3 are not known
at this stage of rewriting process yet, but I'm still working on it
- That won't work. You can't use back references from mod_rewrite in a
RegEx.
- They're known, as Axel-Stéphane already said.
- You must u
Axel-Stéphane SMORGRAV wrote:
The L is not necessary since the redirect is immediate.
Rules below would be tested, but they wouldn't match unless the pattern
starts with scheme + :// + url-path.
Only other status codes than 301, 302, 303 will be forced immediately
(eg. R=404, since apache 2
Bob Smith wrote:
I'm trying to remove two directories from the path of a website, but I just
can't seem to get the mod_rewrite syntax right.
I have a url coming in with a url like
http://www.mysite.com/directoryone/directorytwo/mypage.php?key=value
And I'm trying to redirect it to http://www.my
Ian Brandt wrote:
Looked good, until the "add path info postfix" part.
That's a bug. http://issues.apache.org/bugzilla/show_bug.cgi?id=38642
Use the L-Flag to stop immediately (there will be a redirect processing)
or place the rules into httpd.conf (per-server context).
--
Robert
-
Clodoaldo Pinto wrote:
Would it work with the internal function MapType to escape the
ampersand?
No, because the '&' is a valid character in the URL-path, therefore it
would not be escaped.
--
Robert
-
The official User-To-
Clodoaldo Pinto wrote:
rewrite.log attached
There is one second difference between each processing, that's a lot.
The request gets mapped to the file system but mod_rewrite starts again
back from the uri level. Hm... I'll try to reproduce it sometime.
But anyway: Arre trying to substitute o
Clodoaldo Pinto wrote:
# This RewriteRule causes a redirection loop:
There shouldn't be any redirect at all. No internal, no external
redirect. And the index.php itself is excluded fron the RewriteRule with
a condition.
Can you post/attach/upload the RewriteLog with Rewriteloglevel 5?
David Hubbard wrote:
Hello everyone, can someone tell me if the regular
expression support has changed between 1.3 and 2.0
Yes. Apache 1.3.x uses POSIX Extended while apache 2.x uses the PCRE
library.
But that is documented in the changes2.0-notes as well.
--
Robert
Noah wrote:
Symbolic link not allowed or link target not accessible
So you're accessing a symlink? Now either a
Options +FollowSymLinks
for that directory is missing in your httpd.conf or Apache can't go
to/read the target of the symbolic link.
The symlink is stored in /usr/home/mailman/arch
Noah wrote:
You don't have permission to access /pipermail/garbled-name/ on this server.
Can you find anything related in your error.log?
--
Robert
-
The official User-To-User support forum of the Apache HTTP Server Project.
Denis wrote:
Constantly there are such messages:
XX.XX.XX.XXX - - [01/Apr/2006:15:55:42 +0300] "GET / HTTP/1.0" 200 8273
"-" "Apache/2.2.0 (FreeBSD) mod_ssl/2.2.0 OpenSSL/0.9.7e-p1 DAV/2
PHP/4.4.2 (internal dummy connection)"
what it means?
It's defined in /server/mpm_common.c:
| This fun
Kaspar Fischer wrote:
Is it possible to allow access to a directory when either
the client is from the intranet (IP 192.168.0.*, say) OR
from outside but then a password has to be provided?
That is, I want to combine "allow from 192.168.0" with
AuthUserFile/AuthType authentication. Can one do th
Alexander Lazic wrote:
in VirtualHost-Contex but i loose the user after the
[INTERNAL REDIRECT].
I tried to reproduce it (very limited because you posted only some parts
of the RewriteLog, so it's hard to reconstruct the exact processing),
but it works for me.
I attached the RewriteLog.
Use
[EMAIL PROTECTED] wrote:
Because it says : "initial URL equal rewritten URL"
Use an URL-path instead of a filepath in the substitution. But with
access to the httpd.conf - why don't you use the rules in per-server
context (inside of your , if you're using virtual hosts)?
#per-dir /forum/:
R
Graham Frank wrote:
RewriteRule ^album/([a-z0-9]*)/category/([0-9-]*)/img/([0-9-]*)/?$
displayimage.php?album=$1&cat=$2&pos=$3
Did you check the RewriteLog? So you're using the rule in your
section? Because it is per-dir context (and since you
have access to httpd.conf, there is no need to
William A. Rowe, Jr. wrote:
I'm unfamiliar with what MPM is doing this,
Every MPM using POD (pipe of death). It's defined in /server/mpm_common.c:
| This function connects to the server, then immediately closes the
| connection.
| This permits the MPM to skip the poll when there is only one li
Alexey Polyakov wrote:
Well, maybe there's a reason, but I think that issuing "GET /"
requests (sometimes a few such requests per second) without thinking
of consequences is an overkill. Maybe it's a way to do some low-level
optimization, but once such request hits some dynamic php-script, we
hav
Jon Drukman wrote:
Notice how in the good case it's doing "prefixed with document_root
to..." Why would it skip that in the first case? Is it because I have
a /misc directory on my filesystem?
Exactly, that's normal behavior in per-server context.
How do I get it to always look within the
peter pilsl wrote:
I want to configure a virtual host to return 404 for a specific request
I tried mod_rewrite
RewriteRule ^/(forbidden_.*) - [R=404]
RewriteRule ^/forbidden_ - [R=404]
should work, but this depends upon your apache version. It's implemented
since 2.1 I think. You're using
Atle Veka wrote:
Hi, I have run into a snag with mod_rewrite and proxying. I want to
have a RewriteRule that proxies a dynamic site (based on a map) which
works fine except that I need reverse proxying turned on. So far I have
not been able to come up with a solution. Any ideas, other than specif
Tom Cat wrote:
Alias /demo "/work1/open/"
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
As I feared the first directory (/work1) kicks in and requires a
user. Is there something I can do to unprotect just that one subdir
or will
Alan Little wrote:
I have a rule in
doc root for the domain
Why don't you use the Rules in per-server context (httpd.conf), many
things are a lot easier there, because there is no internal redirect and
the regEx is only compiled once at startup and not per each request.
What can you find in
Dennis Madsen wrote:
The requested operation has failed.
Is this being logged into your error.log?
I'm not sure if this is just a posting issue, but some line breaks are
missing:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.myhp\.dk$ RewriteCond %1 !^www$
RewriteCond c:/www/myhp.dk/
Michael Flanakin wrote:
but I was wondering if anyone could verify my
setup.
Yes, it looks correct to me, but shouldn't ServerAlias look like
ServerAlias *.external.website.com?
Not necessary but some have had problems with it:
ProxyPass / http://xx.xx.xx.xx
I'd append a slash:
ProxyP
Matthew Claridge wrote:
The problem is that our URLs include hashes ('#'), which are escaped as
'%23' in the actual URL. What seems to be happening, from looking at the
rewrite log file, is that Apache successfully processes all those
rewrite rules, but in the process of actually processing th
Emmanuel.Leguy wrote:
So I tried rewriting:
RewriteEngine On
RewriteRule ^/\~(.*) http://realserver.domain.fr/~$1 [proxy,last]
There is no need to escape the '~'.
But if the trailing slash is forgotten the realserver redirect the request:
http://proxy.domain.fr/~username --> http://realserv
Damien Parsons wrote:
I am using some php that configures multiple sites at once and then accesses
them using a site=sitename argument in the php, I'm now trying to setup
separate logins for each sitename. After a few hours of fruitless testing am
I right in assuming that the LocationMatch direct
Dennis Madsen wrote:
Should I insert a rewrite rule in my virtual host for myhp.dk? I have this:
DocumentRoot c:/www/myhp.dk/www
ServerName myhp.dk
ServerAlias *.myhp.dk
ServerAdmin [EMAIL PROTECTED]
php_admin_value open_basedir c:/www/myhp.dk/www/
CustomLog c:/www/myhp.dk/access.log combined
E
Dennis Madsen wrote:
I have this rewrite rule:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^([^.]+)\.myhp\.dk$
RewriteCond %{1} !^www$
RewriteCond c:/www/myhp.dk/www/%1 -d
RewriteCond %{REQUEST_FILENAME} !^c:/www/myhp.dk/www/
RewriteRule (.*) c:/www/myhp.dk/www/%1/$1 [l]
You cannot rewrite to a
Kunal wrote:
Hello All,
I am newbie to rewrite rules. I am trying to redirect requests coming to http://domain.com/test/ to http://domain.com/test.php using below mod_rewrite rules in .htaccess.
There is no leading slash in the rule pattern (left side) in .htaccess
files, so you might try
[EMAIL PROTECTED] wrote:
Apache requires a password on http://site.dom/1/2/3, http://site.dom/1/2
and http://site.dom/1 - however when uploading a different .htaccess that
is supposed to open up (ONLY) http://site.dom/1/2 to the "middle" directory of
/1/2, something unexpected is caused by this /
Evan Platt wrote:
I figured I wouldn't need to reinstall PHP, but I did, and that solved it.
I still get a pop up in Firefox telling me I have chosen to open ''
which is a Application/x-httpd-php .. and what do I want to do with it?
Did you clear the browsers' cache?
--
Robert
-
Thomas Schweikle wrote:
Which module is missing if I am given the error: "Invalid
command 'Order', perhaps misspelled or defined by a module not
included in the server configuration"?
in Apache 2.0/1.3 it's mod_access
in Apache 2.2 it's mod_authz_host
Is there any reference available showing
azeem ahmad wrote:
From: Robert Ionescu <[EMAIL PROTECTED]>
[...]
azeem ahmad wrote:
Options +Indexes +ExecCGI
Order allow,deny
looks like the allow directive is missing somewhere. Try to use
Order allow,deny
allow from all
i did allow from all, then it says the error is "pr
azeem ahmad wrote:
Options +Indexes +ExecCGI
Order allow,deny
looks like the allow directive is missing somewhere. Try to use
Order allow,deny
allow from all
--
Robert
-
The official User-To-User support forum of the Apache
[EMAIL PROTECTED] wrote:
RewriteRule ^(?:.+://)?(.*) https://$1 [R,L]
This doesn't look correct. The pattern is matched against a local URL in
per-server context - w/o sheme+hostname - and a local filepath in
per-dir context
RewriteRule ^(.*) https://example.com/loo/$1 [R,L]
There is a
David Hull wrote:
ServerName www.myserver.com
RewriteEngine On
RewriteRule ^/gift/(.*)$ http://www.myserver.com/buy.jsp?gift=$1
RewriteRule ^/refer/(.*)$ http://www.myserver.com/buy.jsp?refer=$1
ProxyPass /download/ http://www.myserver.com/download/
ProxyPassReverse /download/ http
Joost de Heer wrote:
Robert Ionescu wrote:
Shyne wrote:
Apparently the directive RewriteCond %{REQUEST_FILENAME} !-f matches
requests for existing files, which it should exactly not do.
We were able to analyze the RewriteLog in a German mod_rewrite forum.
The problem here was the following
Tezyn Drasdin wrote:
RewriteRule ^*.(php|cgi|rb|htm|html)? |(_(REQUEST|SERVER|COOKIE)[*]$ YouGo'
n2Jail.html
Is this the correct syntax to get my desired result?
The QueryString does not match against the pattern of the RewriteRule,
you must use a condition in order to check the QueryString l
Boysenberry Payne wrote:
RewriteEngine on
RewriteOptions inherit
RewriteRule ^(.*)log[/]?$ http://69.72.241.170:81/pro/admin.pl [P]
RewriteRule ^(.*)log/(.*)$
http://69.72.241.170:81/pro/admin.pl?data=$2 [P]
Neither of them works so far. What am I missing?
And what e
Shyne wrote:
Apparently the directive RewriteCond %{REQUEST_FILENAME} !-f matches
requests for existing files, which it should exactly not do.
We were able to analyze the RewriteLog in a German mod_rewrite forum.
The problem here was the following:
%{REQUEST_FILENAME} did contain the value f
Shyne wrote:
...
RewriteEngine on
RewriteCond /help/%(REQUEST_URI) !-d
RewriteCond /help/%(REQUEST_URI) !-f
RewriteRule ^help/?(.*)$ /help/index.php?id=$1 [L,QSA]
- I am not sure if /help/%(REQUEST_URI) points to the right place, but
Round parenthesis are wrong, you must use
Kjell Grindalen wrote:
RewriteRule ^/$ http://www.otherdomain.com/Amat\%C3\%B8ren/ [R]
My problem is that when its written out to the client, it comes out like
this
http://www.otherdomain.com/Amat%25C3%25B8ren/
Use the NE flag (no escape) to prevent the escaping of % into %25
Rewrite
David Wolever wrote:
I have noticed that mod_autoindex ignores the IndexIgnore
directive if there is more than one slash after the
domain name.
I reopened bug 16013, I can confirm this behavior, too.
--
Robert
-
The official
Neil A. Hillard wrote:
Hi,
I've been bashing my head against the wall with this problem for a
while now and apart from a headache haven't really got anywhere.
I currently have Apache (2.0.54 but I've tried 2.0.55), built from
source, running as an accelerator to several backends. Wi
Pete Lamborne wrote:
[...]
RewriteEngine on
RewriteRule ^/pub/wiv/(.*)\.asx$ /pub/wiv?seoName=$1 [QSA]
RewriteRule ^/pub/?(.*) ajp://dev3:8009/pub/$1 [P]
I set up the rewriteLog, here are the pertainent lines:
(note that dev2 is the apache box, dev3 is the tomcat box)
10.1.10.82 - - [05/J
Germer, Carsten wrote:
We're using apache 2.2.0 as caching proxy in front of several
application servers. No matter what I tried, I can't get "stickysession"
to see my appservers session-cookie :(
ServerName appfront.desy.de
RewriteEngine on
RewriteRule ^(.*) balancer://mycluster$1 [P,L]
Pete Lamborne wrote:
Gentlemen, thanks for revisiting this; I have not gotten it to work yet
and still need to figure something out.
Oliver, your 1st suggestion resulted in the infinite loop again:
RewriteEngine on
RewriteRule /pub/wiv/(.*).asx$
ajp://theTomcatBox:8009/pub/wiv?seoName=$1 [P
Todd Patrick wrote:
I uninstalled Apache 1.3.33 (Win32) in Add/Remove Programs, however an
entry is still listed in Services.
[...]
Thus, how am I able to uninstall this from the Services list?
If you're familiar with the registry editor, you can remove the entry
manually:
Start --> run ->
[EMAIL PROTECTED] wrote:
Changing from [P] to [PT] also solved the issue with %20 being decoded
to a space before dispatching the request to the rewritten URL (what
the subject describes).
Because no ProxyPass is used anymore, but it was/is a bug:
http://issues.apache.org/bugzilla/show_bug.cgi?
[EMAIL PROTECTED] wrote:
One more thing
--- André Malo <[EMAIL PROTECTED]> wrote:
* <[EMAIL PROTECTED]> wrote:
Hi,
I "solved" this problem by substituting "%20" with "+" characters.
Apparently, mod_rewrite doesn't convert "+" to spaces as it does
with
"%20".
Your "problem" is home-m
LECONTE Laurent ROSI/SICOR wrote:
Actually, writing my last mail gave me an idea : I scratched the ProxyPass
directive altogether, and added a 'dummy' Rewrite for the correctly-written
URLs. Therefore my conf now looks like this :
RewriteRule ^/newsite/(.*) http://internal.address.com/newsite/
64 matches
Mail list logo