Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

How to redirect index page?

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


csanyipal at gmail

May 26, 2012, 12:20 PM

Post #1 of 3 (1040 views)
Permalink
How to redirect index page?

Hi,

on my apache2 server I have installed two aliases:
joomla in /usr/share/joomla/
and
moodle in /usr/share/moodle.

In /etc/apache2/conf.d/moodle I have the line:
Alias /moodle /usr/share/moodle/

and in /etc/apache2/conf.d/joomla I have the line:
Alias /joomla /usr/share/joomla/

One can open booth sites:
http://cspl.me/joomla
and
http://cspl.me/moodle

In /var/www/ I have only an index.html file.

How can I redirect the index.html page so if one want to open the
http://cspl.me then get opened only the http://cspl.me/joomla and from
there if want can open from a menu the http://cspl.me/moodle ?

Any advices will be appreciated!

--
Regards from Pal


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


csanyipal at gmail

May 26, 2012, 1:56 PM

Post #2 of 3 (969 views)
Permalink
Re: How to redirect index page? - SOLVED [In reply to]

Csanyi Pal <csanyipal [at] gmail> writes:

> Hi,
>
> on my apache2 server I have installed two aliases:
> joomla in /usr/share/joomla/
> and
> moodle in /usr/share/moodle.
>
> In /etc/apache2/conf.d/moodle I have the line:
> Alias /moodle /usr/share/moodle/
>
> and in /etc/apache2/conf.d/joomla I have the line:
> Alias /joomla /usr/share/joomla/
>
> One can open booth sites:
> http://cspl.me/joomla
> and
> http://cspl.me/moodle
>
> In /var/www/ I have only an index.html file.
>
> How can I redirect the index.html page so if one want to open the
> http://cspl.me then get opened only the http://cspl.me/joomla and from
> there if want can open from a menu the http://cspl.me/moodle ?

I solve this problem by editing the
/etc/apache2/sites-enabled/000-default

file:
# DocumentRoot /var/www
DocumentRoot /usr/share/joomla

and

# <Directory /var/www/>
<Directory /usr/share/joomla/>

Is this the right solution?

--
Regards from Pal


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


clay.porter at gmail

May 29, 2012, 11:21 AM

Post #3 of 3 (968 views)
Permalink
Re: How to redirect index page? [In reply to]

There are a few ways. You can use an Apache redirect documented here:

http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect

or Apache RewriteRule:

http://httpd.apache.org/docs/2.2/rewrite/

or you can add an HTML redirect to your index.html:

http://www.w3schools.com/html/tryit.asp?filename=tryhtml_redirect


On Sat, May 26, 2012 at 3:20 PM, Csanyi Pal <csanyipal [at] gmail> wrote:
> Hi,
>
> on my apache2 server I have installed two aliases:
> joomla in /usr/share/joomla/
> and
> moodle in /usr/share/moodle.
>
> In /etc/apache2/conf.d/moodle I have the line:
> Alias /moodle /usr/share/moodle/
>
> and in /etc/apache2/conf.d/joomla I have the line:
> Alias /joomla /usr/share/joomla/
>
> One can open booth sites:
> http://cspl.me/joomla
> and
> http://cspl.me/moodle
>
> In /var/www/ I have only an index.html file.
>
> How can I redirect the index.html page so if one want to open the
> http://cspl.me then get opened only the http://cspl.me/joomla and from
> there if want can open from a menu the http://cspl.me/moodle ?
>
> Any advices will be appreciated!
>
> --
> Regards from Pal
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
> For additional commands, e-mail: users-help [at] httpd
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.