1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2008
    Cochin, India
    Rep Power

    Setting redirection into backward folder

    I have a domain say http://www.mydomain.com
    i have the .htaccess file in the root folder to redirect all the calls into index.php
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule .* index.php

    Now, One of the partner website needs to load the same content of what we have in the http://www.mydomain.com,
    and they need to call they URL as

    Of course we have some programing to manage the theme and listing based on the full domain Url.

    How can i set that?

    I have tried in this way

    - I have added the following entry to the httpd-vhosts.conf

    <VirtualHost *>
    DocumentRoot "H:/xampp/htdocs/mydomainrootfolder"
    ServerName mydomain.local/partnerwebsite
    <Directory "H:/xampp/htdocs/mydomainrootfolder">
    Order allow,deny
    Allow from all

    It is redirected to the correct folder
    but the issue there is, since i have
    1) the .htaccess entry as i mentioned above
    2) the folder or file called 'partnerwebsite' doesn't exists in root folder
    it gives an error from the application

    I need to be execute the same index.php file from the root folder as such as the root folder is at 'partnerwebsite' folder

    Please help

  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Rep Power
    ServerName mydomain.local/partnerwebsite
    This part isn't valid. You can't put paths into a ServerName or ServerAlias. You can't create a vhost for a subdirectory.

    If the partnerwebsite directory doesn't exist in your webroot, it seems like the .htaccess rule should be catching the request and routing it through index.php already?

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo