NEOCROME
 
Author Message

Trustmaster


Resellers
Online status (Green = Online)

http://www.cotonti.com
Location: Russia Nizhny Novgorod
Occupation: University Student, Engineer/Programmer, IT Expert
Age: 21
483 posts
    Split
12-07-2007 08:37 GMT   #117327
Which is actually deprecated by HTTP/1.1 RFC, but is supported by most browsers. Yes, I'm complaining of standard-compliance again.

Found the bug at least in: system/functions.php: sed_block(), sed_blockguests(), sed_buildcomments(), sed_buildratings(), sed_die(), sed_dieifdisabled(), sed_redirect().

I'm writing an advanced URL rewrite plugin (alsmost done) and the only obvious problem left for me is redirect headers which may appear here and there and spoil everything. I can write a small corehack (in sed_sendheaders(), I assume) that will both turn relative URLs into absolute and rewrite them into format used in the rewrite plugin. This first action is OK for everyone, the second one is required for my plugin, so maybe that code should be added when installing the plugin. Though, it would be great if there was a "sendheaders" hook.

What do you think?

Kilandor


Resellers
Online status (Green = Online)

http://www.cotonti.com/
Location: United States
Occupation: Web Coder - Gamer - Game Devloper(working on it)
Age: 24
839 posts
    Split
12-07-2007 09:53 GMT   #117328
Well, the thing is for SEO, you really only need to re-write the URL's that are going to be visible to Search engines. The redirects and such are usually never seen by, a search engine. Mean if you want them to look right thats fine. But most general times and what not, its not alot of point to re-write them. The ratings and comments are easy enough to re-write the urls. So, I found it easier for the few urls that aren't seen by search engines, to just leave alone, and to regular users it wont' make a difference, its no t like users are goign to be giving out links to message.php or just loading page going to them.

The only seen url's I didn't re-write, are for sorts, which, I wasn't to worried about.

I would like to go back and sometime, and see about coding a plugin, for all the url's. But, I just went and core hacked them all. It was easiest thing to do. And didn't take to much time. And I mostly documented all the changes, so it won't take much to put them back on updates.

So I wouldn't really worry about those few urls. But I don't see a bug, maybe you could be a little more specific as to the bug. But maybe I just don't totaly understandw hat your talking about ^^

Trustmaster


Resellers
Online status (Green = Online)

http://www.cotonti.com
Location: Russia Nizhny Novgorod
Occupation: University Student, Engineer/Programmer, IT Expert
Age: 21
483 posts
    Split
12-07-2007 10:20 GMT   #117330
About the bug:
PHP Manual

Note: HTTP/1.1 requires an absolute URI as argument to » Location: including the scheme, hostname and absolute path, but some clients accept relative URIs. You can usually use $_SERVER['HTTP_HOST'], $_SERVER['PHP_SELF'] and dirname() to make an absolute URI from a relative one yourself:


RFC 2616

14.30 Location

The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI.

Location = "Location" ":" absoluteURI



About the URL rewrite. I'm writing a plugin which is both search engine and user friendly. The format currently used is like http://mysite.com/forums/m-topics/s-23.html, though it can be customized. It also takes images, styles and other resources into account. Other details will follow when I release it.