Hi. My page has layout:
http://poseido.net/
--family/
----marcin/
------css/
------img/
------webhome/
--------index.html
--------about.html
------index.php
Now. When somebody enters http://poseido.net/family/marcin/
then index.php gets started and it includes webhome/index.html. I'm using smarty as php templates and index.php contains all the formatting and layouting.
When somebody enters http://poseido.net/family/marcin/webhome/about
I'd like to have started http://poseido.net/family/marcin/index. ... me&s=about. This should get all layout and include text from webhome/about.html.
I've written something like this:
RewriteEngine on
RewriteRule ^webhome/(.*)$ index.php?p=webhome&s=$1.
The pages get rewritten ok. My problem is that all styles (referenced as eg. css/main.css) and images (eg. img/background.jpg) suddenly get urls as http://poseido.net/family/marcin/webhom ... s/main.css instead of
http://poseido.net/family/marcin/css/main.css.
What I'd like to achieve is to redirect incoming webhome/about to
index.php?p=webhome&s=about, stop redirecting here, and apply all relative links to url http://poseido.net/family/marcin/
Thanks