« first day (3139 days earlier)      last day (1791 days later) » 

8:20 AM
Stack Exchange updates: Questions must now be at least eight hours old before they can be added to the HNQ list.
posted on May 20, 2019

Questions must now be at least eight hours old before they can be added to the HNQ list.

Stack Exchange updates: The Interpersonal Skills site returned to Hot Network Questions, contributing up to one question
posted on May 20, 2019

The Interpersonal Skills site returned to Hot Network Questions, contributing up to one question at a time.

 
 
2 hours later…
10:00 AM
One question... I'm wondering about the performance/feature difference between Apache's htaccess rewrites and php's. Let's say, we are about to develop a pure php solution. Is there any reason not to move the rewrites to server (for handling pretty permalinks ) rather than using preg_match() in PHP the way WordPress does?
 
 
4 hours later…
1:42 PM
@JackJohansson first, htaccess rewrites don't work on Nginx or the other servers without extra modules that bog down performance
second, WP is going to preg_match anyway
third, you can't hook into a htaccess rule from PHP
fourth, htaccess rewrites can do things WP rewrite rules can't, because they're not the same system. One is for server mappings of URLs and setting Apache/etc options. The other is an regular expression application router
e.g. try to use WP rewrite rules to map /test/ on to test.txt, it can't be done
I don't see why you would ever use HTAccess or Nginx rules as a part of your codes routing
 
2:11 PM
Julia Silge on May 21, 2019

Are education level and job (or career) satisfaction related?

What are the pros and cons of remote work?

Are people in tech overworked? Specifically who, and how much?

 
3:07 PM
@JackJohansson, generally speaking, you want to keep your application logic in one place, putting some of the "smarts" in htaccess will just make the code harder to understand and maintain.
htaccess should only have instructions for the web server to help it to make sense with the URL it is parsing, this should not be a replacement for code.
If the reason to do it is performance, then it is just an early optimization
 
 
1 hour later…
4:17 PM
@TomJNowell @MarkKaplun Thanks for the replies, so there's nothing tragically wrong with it, it's just trying to do the best practice right?
 
@JackJohansson don't use HTAccess for application logic
use HTAccess rewrites to rewrite URLs on to different files
and remember, routing != rewriting
 
The reason I was wondering is that because I found that some major CMS already use this instead of running thousands of preg_match() for permalink handling
 
4:36 PM
if your CMS doesn't have a single entry point, and instead has lots of them
e.g. for PHPBB the file for the forum index isn't the same one that runs for the user control panel
stuff like HTAccess works well as you can map pretty URLs on to your ugly more disorganised ones
better applications are built with a proper bootstrapping process with a router and a single point of entry
think of it as the difference between frontend and WP Admin
WP Admin doesn't have permalinks because we don't route all requests through a single point
the frontend on the other hand, it all goes through index.php
also, Nginx + htaccess = pain
use PHP to do the routing for your PHP programs
 
 
1 hour later…
5:55 PM
Stack Exchange updates: The HTML <title> for a user\'s flag summary now has a new wording of \"Flags raised by [user]\" i
posted on May 21, 2019

The HTML <title> for a user's flag summary now has a new wording of "Flags raised by [user]" instead of "Flagged Posts for [user]".

 
@JackJohansson, we all know one popular CMS that does many things wrong.... just because it is not the end of the world to do such a thing and maybe there are many others that do the same, do not make it right to write a new software like that.
 
 
1 hour later…
7:27 PM
posted on May 21, 2019 by Jonathan Desrosiers

WordPress 5.2.1 is now available! This maintenance release fixes 33 bugs, including improvements to the block editor, accessibility, internationalization, and the Site Health feature introduced in 5.2. You can browse the full list of changes on Trac. WordPress 5.2.1 is a short-cycle maintenance release. Version 5.2.2 is expected to follow in approximately two weeks. You can download [

 

« first day (3139 days earlier)      last day (1791 days later) »