SMF Support > Server Performance and Configuration
Redirecting "unread posts"?
RCMF:
I would like to be able to prevent members entering my forum directly from "http://www.rcmf.co.uk/4um/index.php?action=unread" and force them to "http://www.rcmf.co.uk/4um/index.php" basically stripping-out "?action=unread" but to have "view unread" working normally once on the main page.
I have had a play with the .htaccess file and the Apache rewrite engine but failed miserably! Is anyone able to offer a solution which would do the job?
Thanks in anticipation.
Nigel
Arantor:
Um, why?
I can think of a couple of methods that involve messing around with user sessions, but I have to ask why you're bothered that people are doing that... it means they're visiting your forum and specifically looking for things to reply to.
(Oh, and those solutions will invariably break search engines, and you almost certainly will find yourself with many difficulties as far as being in the search engines go if you go down the route of messing with sessions in the sort of way this will require. Unless it's *specifically* just action=unread, but if that's the case, why not action=unreadreplies or indeed anything else...?)
butch2k:
messing around with $_SERVER['HTTP_REFERER'] might work as well i believe.
Arantor:
Not recommended, there are other security tests that use it, not to mention various security packages remove it.
butch2k:
True enough i forgot about the $referrer test, i did not mean altering but testing its value for a redirect. Checking user session may be indeed the best solution but it might be tricky as well.
Navigation
[0] Message Index
[#] Next page
Go to full version