LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (http://www.linuxquestions.org/questions/programming-9/)
-   -   Change Directory with .htaccess (http://www.linuxquestions.org/questions/programming-9/change-directory-with-htaccess-4175433093/)

valdinei 10-19-2012 02:04 PM

Change Directory with .htaccess
 
Hi,
I have a problem with redirects path in a webserver. For exemplify my diretory tree is:
root/
----/websiteOne/
--------/index.php
--------/onePage.php
----/websiteTwo/
--------/index.php
--------/OtherPageInWebSiteTwo.php

I need access mydomain.com/websiteOne/OtherPageInWebSiteTwo.php

FrankP 10-20-2012 03:04 PM

Hi,

Please can you give some more details of the setup. What webserver software are you running (e.g. Apache?), and what version?

A couple of immediate thoughts: you could use a symlink if your config allows, or you could use a redirecting PHP script in websiteOne to call the script in websiteTwo. Or you could choose to rewrite URLs (mod_rewrite in Apache) -- maybe worth it if you need to map quite a few scripts between the two sites.

There are lots of ways something like this could be done. Which to go for will depend on what you're trying to get done.

Hope that helps


All times are GMT -5. The time now is 08:08 AM.