Link to home
Start Free TrialLog in
Avatar of Large_Farva
Large_Farva

asked on

2 php applications in root?

My project currently includes 2 different 3rd party php scripts.  I really need both in the root if possible but have never heard of doing it before.  The only common file is index.php and htaccess and all the folders for each application are named differently.
I didn't know if there was some kind of pixie dust or whatever that would make this happen.  

I am running on a dedicated linux box with apache, php, mysql.  

Thanks!
Avatar of ray-solomon
ray-solomon
Flag of United States of America image

I'll sell you some genuine pixie dust for $1000 guaranteed to fix your programming problems forever.

As for your real problem, what 3rd-party scripts are you referring to?
Avatar of Beverley Portlock
"I really need both in the root if possible"

Why do they need to be there? What are these scripts intended to do? You can use PHP in command line mode and run it as root.

http://php.net/manual/en/features.commandline.php
Avatar of pius_babbun
pius_babbun

In the question title you have mentioned "2 php applications" . In this case these might be in different folders and has different index files for each of these. In this case you can just have one common file  out these files (index.php) and just redirect with the link navigation if needed. or you can include index files of both the applications in this common file  and call the functions of them to work. Hope it helps.
Avatar of Large_Farva

ASKER

ray_solomon: the check is in the mail, can you finish yesterday?

Thanks guys...to frame this a little better:
I am using PhpFox (social network script) and Jrox JEM, which is an integrated cart/affiliate system.  I am fine with having the "cart"  in a subfolder but don't want my affiliate links to have to include the subfolder.  
So when I say "I really need both in the root if possible" I guess I really an saying "I need them to appear as if they are in the root".  I have been trying to get my htaccess to rewrite www.mydomain.com/affiliates/affiliateusername to remove the directory "affiliates" from url so they can distribute the link:  www.mydomain.com/affliateusername and have it give them credit.  

I have asked a couple of times here and thought I had a solution but I have yet to get it working 100%
Here is my .htaccess if you guys want to take a shot:
RewriteEngine On
	
	RewriteBase /

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule (.*) http://www.mydomain.com/affiliates/$1 [R=301,L]
	#RewriteRule ^(.*) index.php?do=/$1

Open in new window

This is close to working right.  When I navigate to root it lands fine but if I click on any links in the social network site, I go to the affiliate subfolder.  I need the conditions set up to where only traffic with a variable after the trailing slash that is NOT a filename or folder to go to the affiliates directory...which the above code should do but the hangup is the dynamic links?  

Or is there a better way overall to approach this, sans pixie dust?

Thanks.

ASKER CERTIFIED SOLUTION
Avatar of pius_babbun
pius_babbun

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial