Re: Rewrite Rules, SSL, and .htaccess
From: Jeremy Miller (jm_at_gblx.net)
Date: 03/29/04
- Previous message: Small, Jim: "RE: nis : how to avoid user1 becoming user2 using local root ?"
- Maybe in reply to: davec: "Rewrite Rules, SSL, and .htaccess"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 29 Mar 2004 12:29:16 -0700 To: davec <davec@webpipe.net>
davec wrote the following on 03/28/04 18:31:
>> RewriteEngine on
>> RewriteBase /usr/local/website
>> RewriteCond %{SERVER_PORT} !^443$
>> RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R]
>
>
> This seems to work for all cases except when I enter
> www.mydomain.com/dir without the final trailing slash, and then I get a
> 404 error. I did a little more research and found a rule that seems to
> work (inside the Directory tag) only for that special case:
> RewriteRule ^$ https://%{SERVER_NAME}/dir/ [L,R]
> The rule only works when it is by itself. I tried to combine them like
> this:
> RewriteRule ^$ https://%{SERVER_NAME}/dir/ [L,R]
> RewriteRule ^(.*)?$ https://%{SERVER_NAME}/$1 [L,R]
> Then I get the same 404 error as before when I leave out the trailing
> slash. How can I get both of these rules to work together?
> Thanks,
> Dave
ahh.. the "trailing slash" problem with Apache..
<URL: http://www.onlamp.com/pub/a/apache/2004/02/19/apache_ckbk.html?page=2>
a quote from the above article:
"The "trailing slash" problem can be caused by one of two configuration
problems: an incorrect or missing value of ServerName, or an Alias with
a trailing slash that doesn't work without it."
Try reading that and double-checking your configuration.
-- -jm GPG Key ID: 0x7A245D01
- Previous message: Small, Jim: "RE: nis : how to avoid user1 becoming user2 using local root ?"
- Maybe in reply to: davec: "Rewrite Rules, SSL, and .htaccess"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|