httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From O-One <ola_...@yahoo.com>
Subject Re: [users@httpd] Rewrite help needed Please!!!
Date Fri, 31 Dec 2004 03:08:13 GMT
Thanks Sean,

I am not that sophisticated yet to be that precise.
What I want to happen is if someone types
http://www.abc.com that person should be automatically
redirected to https://www.abc.com

Since the default protocol is http, most users do not
want to be bothered with typing anything other than
www...

By the way, if I am putting the rewrite, does that
mean PORT 80 should be opened on the webserver or is
it just 443 still?

Thanks a million.
--- Sean T Allen <sean@usaherbals.com> wrote:

> 
> O-One wrote:
> 
> ><VirtualHost *:80>
> >    ServerAdmin ola_one@yahoo.com
> >    DocumentRoot C:/../Apache Group/Apache/htdocs
> >    ServerName www.abc.com
> >    ServerAlias abc.com *.abc.com
> >    ErrorLog /usr/www/abc.com/logs/error_log
> >    CustomLog /usr/www/abc.com/logs/access_log
> common
> >
> >
> >    RewriteEngine On
> >    RewriteCond %{REQUEST_URI} ^/dir.*$
> >    RewriteCond %{SERVER_PORT} ^80$
> >    RewriteRule ^.*$
> >https://%{SERVER_NAME}{REQUEST_URI} [R]
> >
> >  
> >
> 
> Ummm are you just trying to redirect anything that
> starts with /dir?
> 
> assuming you want to redirect EVERYTHING...
> 
> RewriteEngine On
> RewriteCond %{SERVER_PORT} ^80$
> RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
> 
> would work...
> 
> or you can use %{REQUEST_URI}
> 
> if you want to just redirect anything that starts
> with /dir
> 
> then this is simpler than yours...
> 
> RewriteEngine On
> RewriteCond %{SERVER_PORT} ^80$
> RewriteRule ^(/dir.*)$ https://%{SERVER_NAME}$1
> [R,L]
> 
> but again for both of these if its in the virtual
> host, you already
> know the server name so it seems a bit redundant...
> when lets say
> if you direct both www.example.org and example.org
> 
> if your ssl cert is just for www.example.org then:
> RewriteEngine On
> RewriteCond %{SERVER_PORT} ^80$
> RewriteRule ^(/dir.*)$ https://www.example.org$1
> [R,L]
> 
> would be better... unless you want cert errors
> popping on the client...
> of course if you have a wildcard cet you dont need
> to worry about that...
> 
> ></VirtualHost>
> >
> >In looking at the above container, should there be
> ><VirtualHost  *.443>?
> >  
> >
> Yes..
> 
> > begin:vcard
> fn:Sean T. Allen
> n:Allen;Sean T.
> org:USA Herbals, LLC
> email;internet:sean@usaherbals.com
> title:Tech Guru
> tel;work:718-388-5424
> x-mozilla-html:FALSE
> version:2.1
> end:vcard
> 
> 
> >
---------------------------------------------------------------------
> 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@httpd.apache.org
>    "   from the digest:
> users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail:
users-help@httpd.apache.org



		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message