Jump to content

Recommended Posts

Hi All,

 

Is this possible? I have my site in a directory structure like this:

 

home/

  -user/

      -user_images/

      -user_files/

      -twiki/

      -public_html/

            -index.php

 

I would like to redirect incoming requests for http://www.mydomain.com/twiki  to the twiki/ directory. I am not sure if it is possible because it is "behind the wall" in a web inaccessible folder. I am able to access user_images/ and user_files/ through relative urls in php. I was wondering if there was similar way with .htaccess like:

 

RewriteRule twiki/$  ../twiki/

Sorry I kind of simplified my example. Where I have the index.php listed in my directory structure I am actually hosting a pretty big web application. The web application runs on this MVC frame work that uses a .htaccess file to remap all incoming urls to index.php as GET variables.

For example http://www.mydomain.com/twiki ends up as http://www.mydomain.com/index.php?1=twiki

 

So the web app will not redirect to the twiki directory and will come back with an error as there is no controller for twiki.

 

Currently I have the twiki directory under Public_Html and have modified .htaccess to direct accordingly. I would however like to keep the twiki out of the web apps files, and out of the public_html for organizational purposes. I thought this might be easy as my hosting provider has a cpanel directory setup behind the public_html which http://www.mydomain.com/cpanel is directed to.

 

I'm thinking I would need to edit the apache config and add an alias or something. Also I suppose I could make a twiki controller for the web app which would redirect accordingly.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.