Results 1 to 5 of 5
  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    2

    Question help needed how to redirect

    hey all newbie here

    I want people to be redirected to my miva store from my main domain name

    how do i do this thanks all in advance

  2. #2
    Senior Member rispku's Avatar
    Join Date
    Mar 2005
    Posts
    143

    Default

    There are several ways of doing this, but the best way to do it is with an htaccess file.

    Placing the following rule in an .htaccess file, in your document root (/var/www/html), will effectively redirect anyone requesting an "index file" in any of your directories.

    Code:
    DirectoryIndex index.html index.htm index.php /Merchant2/merchant.mvc
    Red = you may need to change this

    It's important to list all of the index file-names and/or extensions you plan on using in other areas of your site! This rule is recurssive; it will apply to all of the sub-directories in your document root.

    Another way of doing it is with PHP's header function. You can place the following code in an index.php file in your document root, and have it redirect the visitor to Merchant's URL on your site.

    Code:
    <?php
    header("Location: http://www.yourdomain.com/Merchant2/merchant.mvc", true, 301);
    exit;
    ?>
    HTH
    Last edited by rispku; 10-13-2005 at 07:44 PM. Reason: Typo

  3. #3

    Default Location of Joomla on main domain

    It is correct to used a .htacces to make Joomla behaves as if it were at main domain:
    DirectoryIndex index.html index.htm index.php /joomla/index.php


    I spent several hours, trying to make it work and I did not realized that after the /joomla I had to used the index.php

    I just created my
    DirectoryIndex index.html index.htm index.php /joomla/index.php

    in a text file, uploaded through the file manager as htacces.txt file and then renamed as .htaccess file, BUT THE FILE DISSAPEARED. So I had to look it trough a FTP software, and there it was.

    I added the /index.php to the
    DirectoryIndex index.html index.htm index.php /joomla
    and Joomla came alive when I typed my main domain.

    Thank You for your tip. I am making this note, to help others avoid my own mistakes in following instructions.
    Last edited by Justino Mora, Recruiter; 04-01-2006 at 03:01 PM. Reason: Better visibility of comments

  4. #4
    Senior Member
    Join Date
    Jan 2006
    Location
    ct
    Posts
    133

    Question

    Quote Originally Posted by Justino Mora, Recruiter
    It is correct to used a .htacces to make Joomla behaves as if it were at main domain:
    DirectoryIndex index.html index.htm index.php /joomla/index.php


    I spent several hours, trying to make it work and I did not realized that after the /joomla I had to used the index.php

    I just created my
    DirectoryIndex index.html index.htm index.php /joomla/index.php

    in a text file, uploaded through the file manager as htacces.txt file and then renamed as .htaccess file, BUT THE FILE DISSAPEARED. So I had to look it trough a FTP software, and there it was.

    I added the /index.php to the
    DirectoryIndex index.html index.htm index.php /joomla
    and Joomla came alive when I typed my main domain.

    Thank You for your tip. I am making this note, to help others avoid my own mistakes in following instructions.

    i dont see the DirectoryIndex index.html index.htm index.php etc in my htaccess file?

    do i need to put that in? if so , where ?

    thanks

    Lisa


    is there a specific place in the htaccess file i shoud put this?

    thanks
    lisa

  5. #5
    Junior Member skimber's Avatar
    Join Date
    Jun 2009
    Posts
    14

    Default

    Quote Originally Posted by lclark View Post
    i dont see the DirectoryIndex index.html index.htm index.php etc in my htaccess file?

    do i need to put that in? if so , where ?

    thanks

    Lisa


    is there a specific place in the htaccess file i shoud put this?

    thanks
    lisa
    You just need to put it in your .htaccess file. It can go anywhere in the file as long as it isn't in the middle of another line of code.

Similar Threads

  1. Apache Redirect with variables.
    By HelixGroup in forum General Discussion
    Replies: 0
    Last Post: 09-10-2007, 07:50 PM
  2. Replies: 4
    Last Post: 12-22-2006, 05:05 PM
  3. Problems with .htacess?
    By rgkopchak in forum General Discussion
    Replies: 3
    Last Post: 07-19-2006, 12:31 PM
  4. 301 redirect from site.tld to www.site.tld
    By markwolk in forum General Discussion
    Replies: 1
    Last Post: 11-30-2004, 04:36 PM
  5. WH What version of phpBB now being installed?
    By wildjokerdesign in forum PHP / MySQL
    Replies: 3
    Last Post: 04-26-2004, 09:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •