Hi guys & dolls,

I'm working on a website locally with MAMP and the directory tree is the same then that of the dev directory on my web server.
projects --> ecwc --> concept

But I've set the 'projects' directory on my webserver as a subdomain and this screws up my links.
Locally I have to create links like this: /projects/ecwc/concept/about/organisation.php
and for on my webserver they have to be like this: /ecwc/concept/about/organisation.php

Is it possible to set the 'concept' directory as a root directory with htaccess (htaccess file is in 'concept' directory) so that I can just create links like: /about/organisation.php? Like this will also be eventually the links for on the live server (in public_html), so I don't have to change anything.

Recommended Answers

All 3 Replies

Thanks Cereal, but I was totally wrong witn my previous thinking. I just need to look for the solution in PHP and have now something like this with my paths:

<a href="<?php echo $_SERVER['REQUEST_URI'].'about/organisation.php'; ?>">Organisation</a>

But this doesn't work with files from within a sub directory.

I will close this thread by marking it as solved, because the real issue has nothing to do with .htaccess. Would be handy to have an option to close a thread instead tho.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.