Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help test a possible future change.
#5
hameau Wrote:I have never had a server 404 page, with GS v3.x, no matter how I try to break it, neither with the default GS error page nor with a custom page (slug==404). Am I missing out ? ;-)
It seems my example was wrong. Sorry.

The default GetSimple .htaccess file only sends you to GetSimple if the last character of the URL (not counting the trailing /) is a letter (A–Z), number (0–9), a -, or a _. Try going to /example== on your server with the original .htaccess, that should show you the server’s 404 page.

(Another funny thing about this way of parsing is that GetSimple will open your frontpage when you go to /=€!=index, it just skips characters it does not understand as long as it understands the end of the URL.)

mvlcek Wrote:I think it would be better to use only one parameter, let’s say path. That way it would look better on installations with fancy URLs turned off.

Mike came with the same comment. I’ll post my reaction from the issue tracker here for you all to read without leaving the forum:

martijn.personal (that’s me) Wrote:I agree, as I said at the end of the original issue:

Quote:Something to think about [is] w[h]ether we might want to opt for a more WordPress like system and just pass everything along to the PHP.

I just tried to support the ‘old way’ in the .htaccess as well, this way we’ll be catering for plugin authors already, even before we would have had a need to rewrite the whole URL parsing. It will also keep old plugins working that might depend on the $_GET['id'] variable.

Code:
RewriteRule ^((.+/)?(.+?)/?)$ index.php?path=$1&id=$3 [QSA,L]

Would put the complete path, including the possible trailing slash and the value of $_GET['id'] into $_GET['path'] while still supporting putting the last part of the request in $_GET['id'] as well. (Untested, I’m at school.) Would that be better?
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply


Messages In This Thread
Help test a possible future change. - by hameau - 2012-03-26, 20:54:08
Help test a possible future change. - by Carlos - 2012-03-26, 23:52:13
Help test a possible future change. - by mvlcek - 2012-03-27, 00:39:54
Help test a possible future change. - by Zegnåt - 2012-03-27, 02:54:33



Users browsing this thread: 1 Guest(s)