I used this rule on my site:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
Options -Multiviews
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.erecruitmentportal.com$
RewriteRule ^(.*) http://erecruitmentportal.com/$1 [QSA,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/?$ employers/page.php?page=$1 [L]
</IfModule>
When when one logs into the website, it sets a session only in the /employers/ directory. This means that only files in that directory can access the session.
Now after rewriting urls from http://example.com/name to http://example.com/employers/page.php?page=$1,
- i cannot access my sessions again
- in the employers folder, i have a folder - logos, now i cant access logos/pic.jpg from page.php (thats the url-rewritten version). It still sees the page from the root.
I am thinking its a rewrite base issue, so how do i modify this so it will work well for this, and not affect other rules that may follow.
Thanks
EDIT
This is my session settings:
session_start();
session_set_cookie_params ( $this->sessiontimeout, $this->subdomain, $this->website, 0, 1 );
//i want the session to be available only to files in a particular folder
ini_set('session.use_only_cookies', 1);