DNS
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationDNS

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old May 18th, 2002, 11:51 AM
Garrett_44 Garrett_44 is offline
rubbish in javascript
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: London
Posts: 683 Garrett_44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 41 m 39 sec
Reputation Power: 8
Question shortcuts?

hello

not sure which forum i should be asking this in but i need to figure out a way to create shortcuts on my server to particular addresses.

for example i will have something at..

http://www.mysite.com/projects/projectone/index.php
but i want it to show up at...
http://www.mysite.com/projectone/index.php

now i know i could create a page index.php at...

http://www.mysite.com/projects/index.php

which could refer to the correct address but that will still show the real address or of course i could have a frame which would mask the real address but i was wondering is there another way to do this perhaps via the .htaccess file???

thanks in advance
gar

Reply With Quote
  #2  
Old May 18th, 2002, 01:48 PM
mezz mezz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2001
Posts: 310 mezz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
It has nothing to do with DNS; it's Apache... You should search for internal redirect under user "freebsd" in Apache section, he has answered it so many times..

Reply With Quote
  #3  
Old May 18th, 2002, 02:12 PM
Garrett_44 Garrett_44 is offline
rubbish in javascript
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: London
Posts: 683 Garrett_44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 41 m 39 sec
Reputation Power: 8
hi

ok from what i understood this is all apache stuff which i not alone dont understand but can't touch on my server due to the fact its a rented space.

this is starting to get annoying now cos two weeks ago i needed to modify the php .ini and of course i'm not allowed do that ether.

so at the risk of turning this into another question does anyone know of any hosts where you can rent space and you do have access to these types of files, or does that not exist??

a+
gar

Reply With Quote
  #4  
Old May 19th, 2002, 06:46 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
of course this is possible. it just depends on how much you want to pay.
you can even rent a server where you have administrator / root login

this question should go to the "web-hosting" forum, but sorry, i will not follow you there (i boycott this forum due to the advertising there.)
but i think this has been offered already there.

another approach to your shortcut-problem:
unix supports filesystem-based shortcuts:
Code:
/www/www.mysite.com/# ln -s projects/projectone .


you can also create them from php script if you donīt have shell access
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Reply With Quote
  #5  
Old May 19th, 2002, 07:09 AM
Garrett_44 Garrett_44 is offline
rubbish in javascript
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: London
Posts: 683 Garrett_44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 41 m 39 sec
Reputation Power: 8
>you can also create them from php script if you donīt have shell access

i dont!! is this under the filesystem functions i can do this?? what do i need to look for in the manual to do this??

thanks
gar

Reply With Quote
  #6  
Old May 19th, 2002, 08:43 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
http://www.php.net/manual/en/function.symlink.php

you probably need to login via ftp before, chmod the parent directory to 777 and after this you should chmod back to 755 (!)

Reply With Quote
  #7  
Old May 19th, 2002, 09:48 AM
Garrett_44 Garrett_44 is offline
rubbish in javascript
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: London
Posts: 683 Garrett_44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 41 m 39 sec
Reputation Power: 8
mmm the explanation there is a bit on the minimal so i'm a bit vague about what exactly this does and how it works, at the moment i'm searching devshe for any other threads on "symlink" to see if i can get a clearer idea of what this does, if you know of any threads, tutorials etc i would appreciate the urls.

sorry for being so dim but this is the first time i've ever done something with the filesyatem in php!!

a+
gar

Reply With Quote
  #8  
Old May 19th, 2002, 10:27 AM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
you probably wonīt find much info on devshed about symlinks. they are a basic unix filesystem thing.
similar to links in windows ("shortcut"), but they work better. a link to a directory is treated as directory.

so:
PHP Code:
 chdir("/www/..../www.yourhost.de");
if (
symlink("projects/projectone","./projectone")) {
  echo 
"Symlink created.";
} else {
  echo 
"Symlink not created.";


should do the job.
as told earlier, login via ftp before and after to set the permissions!

Reply With Quote
  #9  
Old May 19th, 2002, 02:14 PM
Garrett_44 Garrett_44 is offline
rubbish in javascript
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2001
Location: London
Posts: 683 Garrett_44 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 41 m 39 sec
Reputation Power: 8
i dont follow, i have very limited knowledge of windows systems and just begining to understand unix systems.

in your code...
chdir("/www/..../www.yourhost.de");

i understand whats going on with a chdir() but the url you use has me confused - "/www/..../www.yourhost.de", ok i understand that "www.yourhost.de" should be replaced with my site url but why the "/www/...." before it? and why use the url when thats not the real address of my site which is more like "/home/sites/site170/users/garrett/web/collective"

i did a test like so..

$dir = getcwd();
chdir("$dir/projects");
$dir = getcwd();
echo $dir;

and i understand whats happening there, ie the current directory is changed for one beyond at "/projects" but after that i'm lost and cant figure out how to use this?

what does the symlink actually create, a file? does this only last for the duration of this script?

if*(symlink("projects/projectone","./projectone"))*{
echo*"Symlink created.";
}*else*{
echo*"Symlink not created.";
}

thanks in advance
gar

Reply With Quote
  #10  
Old May 19th, 2002, 04:05 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 39 m 55 sec
Reputation Power: 184
you should replace the path with the path to your www root. if you use a relative path, the script must be in the root.

the symlink actually is a special file. it is like a text file that only contains the name of the other file. not really, but think of it like that.
and it lasts until deleted. and it shows up in your ftp-client.

additionally to this, apache needs to be setup to follow sym-links, sorry, forgot this. you need to ask your provider for this if it is not already activated. if you have htaccess configuration access, you probably can activate it yourself.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationDNS > shortcuts?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway