Redirect Question

Redirect Question

Post by Helmut Tessare » Thu, 19 Dec 2002 07:04:23



Sorry to ask, but I would need help with a redirect issue:

If a user wants to access http://www.test.com/mail he should be
redirected to
https://www.test.com/mail
What possibilities do I have to do that?
What is more performant? Redirect or Rewrite?
Is it better to user relative paths or full qualified paths?

Thanks in advance,

--
mfg/regards    
     Helmut K.C. Tessarek

 
 
 

Redirect Question

Post by Shay Hug » Sat, 21 Dec 2002 02:23:35


you could use a simple redirection html based code, put it as a default
document in /mail dir
you'll have to create a virtual directory or at least change the name for
the secured mail dir.
and it'll work.
<meta http-equiv="Refresh" content="1; URL=https://www.test.com/mail">

you could even write a server side (php) script or even javascript etc...
that modifies the http headers whenever syn/ack goes to
http://www.test.com/mail and redirect it.

if you wanna do it in apache's way use redirect (that's what i'm using)
i'm really not sure about the performance redirect and rewrite rules, sorry.

<VirtualHost 99.xxx.99>

       DocumentRoot "/opt/local/apache2/maindoc/"
       Redirect  /mail  https://www.test.com/mail
       ErrorLog logs/tot_error_log

       ServerName www.mpthrill.com

</VirtualHost>

you could find more information about the Redirect directive here:
http://httpd.apache.org/docs/mod/mod_alias.html

good luck!

- Shay Hugi
- Mpthrill.com Software Industries


Quote:> Sorry to ask, but I would need help with a redirect issue:

> If a user wants to access http://www.test.com/mail he should be
> redirected to
> https://www.test.com/mail
> What possibilities do I have to do that?
> What is more performant? Redirect or Rewrite?
> Is it better to user relative paths or full qualified paths?

> Thanks in advance,

> --
> mfg/regards
>      Helmut K.C. Tessarek


 
 
 

1. Apache Redirect question

Hi All,

I'm trying to redirect all requests for files in one directory to a
directory on another server as such:
RewriteRule ^/TheDirectory(.*)
http://www.otherserver.com/TheOtherDirectory$1 [P,L]
This works, but I would like to keep the first URL in the location
bar.
So, I would like to see www.thisserver.com/TheDirectory once I'm
redirected to the other server.
Is this possible, or am I forced to use a frameset here?
Any ideas?

R.

2. SMALL screen or BIG desktop ???

3. iptables redirect question.

4. Can I have a file output to the terminal as changes are appended to it?

5. I/O redirect question

6. EzPPP Setup and dialing

7. How To Redirect Question

8. spinlocks, the GPL, and binary-only modules

9. Redirect Question

10. Basic redirect question: stderr to /dev/null in cron job

11. htaccess redirect question inside...

12. a redirect question

13. Interesting IP redirect question