Jump to content

Recommended Posts

Hi to all,

 

I have some strange problem. I am using this .htaccess file

 

Options +FollowSymLinks 
RewriteEngine On

DirectoryIndex mvm.php
ErrorDocument 404 /mvm.php
RewriteRule ^chessdatabase/$ /mvm.php [L]
RewriteRule ^searchposition/(.*)/$ /search-database-position.php?fen=$1 [L]
RewriteRule ^([0-9]+)/searchposition/(.*)/$ /search-database-position.php?fen=$2&page=$1 [L]
RewriteRule ^chessgame/(.*)/(.*)/([0-9]+)/$ /chessgame.php?gameid=$3 [L]
RewriteRule ^onlinechessdatabase/$ /search-form.php [L]
RewriteRule ^onlinechessdatabase/([0-9]+)/$ /search-form.php?page=$1 [L]

# If requested resource does not exist as a file
RewriteCond %{REQUEST_FILENAME} !-f
# and does not end with a period followed by a filetype
RewriteCond %{REQUEST_URI} !\..+$
# and does not end with a slash
RewriteCond %{REQUEST_URI} !^(.*)/$
# then add a trailing slash and redirect
RewriteRule ^(.*)$ http://www.gensunasumus.com/$1/ [L,R=301]

 

 

 

Problem is that when I use some rewrite rule php does not send session to page.

For example when I come to: http://www.gensunasumus.com/chessdatabase/

PHP does not send session,

But when I use http://www.gensunasumus.com/mvm.php everything is OK.

What can be a problem? Hope you understand my problem.

Thanks in advance

 

Link to comment
https://forums.phpfreaks.com/topic/187013-php-htaccess-and-session-problem/
Share on other sites

I can't personally see how the .htaccess could possibly effect whether your page is part of a session. I could potentially understand if you were masking another URL as the cookie would be registered against a different domain, but in this case your obviously not. Since sessions are handled by PHP if you are arriving at the right page it should be part of the session. Do you have session_start() at the top of all the pages you wish to be part of the session? The only thing I can suggest trying is checking your Cookies under both situations and see if there is any difference for the SESSIONID. The web developer toolbar for Firefox is pretty handy for this. On a side note, using frames with IE can affect sessions, but I don't see how this will relate in your case.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.