LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-19-2012, 01:04 PM   #1
valdinei
LQ Newbie
 
Registered: Jul 2012
Location: Brazil
Distribution: Ubuntu, Freebsd, CentOS
Posts: 17

Rep: Reputation: Disabled
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
 
Old 10-20-2012, 02:04 PM   #2
FrankP
Member
 
Registered: Aug 2003
Location: Britain
Distribution: AntiX, Debian, Gentoo
Posts: 65

Rep: Reputation: 18
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
 
  


Reply

Tags
apache, htaccess, php, rewrite, webserver


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
use htaccess higher up directory no symlinks? qwertyjjj Linux - Server 2 08-20-2012 09:10 AM
.htaccess redirection to a specific directory sycamorex Linux - Server 2 02-02-2012 11:47 AM
.htaccess vrs <Directory> vous Linux - Software 4 01-06-2007 01:04 PM
Directory with .htaccess is invisible?! Barca Linux - General 5 02-23-2005 12:28 PM
Directory listing control with .htaccess quincy56 Linux - Security 0 02-09-2002 10:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration