FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


symbolic links with cpanel





elcyron
hi there.

i was experimenting with running multiple instances of a phpscript .

basicly i wanted a structure like this

/script/0
/script/1
/script/2

1 and 2 being symbolic links to 0 , so if i update 0 1 and 2 will change as well.

no big deal on any unixlike system, quite a problem on a webserver without SSH. can the Cpanel filemanager create links? i didn't see that feature yet
Daniel15
I don't think you can do symbolic links here, as we don't have shell access.

However, if you're using PHP, you can use the path info in much the same way. For example, if your script is index.php, you could access it using

/index.php/1
/index.php/2
/index.php/3

To get the number at the end, use substr($_SERVER['PATH_INFO'], 1) (this will remove the slash at the start).

Or, you could use mod_rewrite (which is slowly becoming my best friend Very Happy). Maybe something like this would do:
Code:

RewriteEngine on
RewriteRule ^/script/(.+)$ script.php?page=$1 [L]

This will redirect all hits from /script/[whatever] to /script.php?page=[whatever]. You could edit it to suit your need.
elcyron
thanks for your answer but i'm not writing PHPscripts - can hardly read them.

rewriting the script i downloaded is way above me
Related topics
cPanel login page does not appear
Programming links, info, and tutorials
CPanel
Symbolic Links...
cPanel and Directadmin Tutorials
[php] including from lib folder impossible
php instalation:
Firefox Extension- FireFly
Using 'ln'
Symbolic Links...... Need HELP
php hosting
Problem with rename on Linux?
Shortcuts in PHP/Directadmin
Ubuntu - Linux for human beings
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.