symbolic links for making tidy URI's

N

Nick Howes

Hello,
I was seeing if I could get my website so that I can have simple
addresses to pages like http://www.something.com/cheese or /about, while
having the html files all in the same directory. You can do this by making a
symbolic link (for windows users, the unix version of a shortcut) at
/cheese/index.html or whatever, and that works. But what if the pages I want
to link to are based on GET variables, eg index.php?page=about or
index.php?page=cheese ? I don't think symlinks would work here. Any ideas?

Cheers
 
D

Dylan Parry

Nick said:
I was seeing if I could get my website so that I can have simple
addresses to pages like http://www.something.com/cheese or /about, while
having the html files all in the same directory. You can do this by making a
symbolic link (for windows users, the unix version of a shortcut) at
/cheese/index.html or whatever, and that works. But what if the pages I want
to link to are based on GET variables, eg index.php?page=about or
index.php?page=cheese ? I don't think symlinks would work here. Any ideas?

Read up on Apache Mod Rewrite. This does exactly what you are looking for.
 
N

Nick Howes

Dylan Parry said:
ideas?

Read up on Apache Mod Rewrite. This does exactly what you are looking for.

Aha. How much server access will I need to do this? Will I basically need to
be running the server myself or is this at all possible using a hosted
server to which I have SSH access?

Thanks
 
D

Dylan Parry

Nick said:
Aha. How much server access will I need to do this? Will I basically
need to be running the server myself or is this at all possible using a
hosted server to which I have SSH access?

You need only the ability to use .htaccess files, nothing more, nothing
less. Any paid host should allow you to use these, not so sure about free
ones though...
 
N

Nick Howes

Dylan Parry said:
You need only the ability to use .htaccess files, nothing more, nothing
less. Any paid host should allow you to use these, not so sure about free
ones though...

Great I'll read into it. Thanks guys.
 
T

Toby A Inkster

Dylan said:
You need only the ability to use .htaccess files, nothing more, nothing
less. Any paid host should allow you to use these, not so sure about free
ones though...

It also assumes though that mod_rewrite is installed. This is a fairly
safe assumption though as it is more or less standard.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top