Recently I solved my issue with mod_rewrite to redirect a domain to a subfolder. Now that I've fixed my original issue, I've hit a another wall.
Here is an example structure:
/
/index.php
/content/
/content/styles.css
/domain/
/domain/index.php
For simplicity, /domain/ is the current and top-most folder. In /domain/index.php I am trying to access /content/styles.css. How can I accomplish this? Assume there is no web link to the previous directories. Also ../ does not work as ../ returns the same directory as ./.
I thought of a way, but my .htaccess skills aren't very strong and I don't want to spend hours or days piecing together an answer. Let's say I have:
<link rel="stylesheet" type="text/css" href="content/styles.css" />
If I am right, href performs a request for the file. How can I use .htaccess to capture the request and point it to the correct folder? Like if the query string looks like ^/content/(.*)$, and rewrite it back one directory to access ../content instead.
Hopefully this made some type of sense.
/content/inside/domain/. eg/domain/content/?/is root. Bothdomain/andcontent/are subdirectories of/.