I am developing a new site, and I would like to keep my rewrite rules in the database, and not directly in the .htaccess files.
I have another site that uses Opensef ( http://sourceforge.net/projects/opensef/ ) using Joomla! who does it, but im not even 100% how it works under the hood.
How can I store these rules in a database, query them on request and reassign them to a clean URL if it is found? Is there a better way to do this instead of loading the .htaccess file (maybe 1000 entries)?
Thanks,
mod_rewrite , PHP Python, mod_rewrite.
http://httpd.apache.org/docs/2.0/misc/rewriteguide.html (. )
RewriteMap quux-map prg:/path/to/map.quux.pl
, Joomla, , .htaccess mod_rewrite .
, , Openserf. , , , Redirect PHP, . , , Joomla , ,
, Pathauto Drupal, .
, , :
. .
UrlRewriteFilter, Tomcat Apache.
Tomcat - - , Apache (, FastCGI PHP), , Apache.
, , , , , , script, . Apache ErrorDocument, URL- script.
You were pretty subtle in the details of what a "new site" is, but you might want to create a Front Controller for your application, and it takes care of all the incoming URLs. Many (most?) Web applications use this approach.
Source: https://habr.com/ru/post/1709551/More articles:Why? - cssKeeping the sort order of items stored in the HABTM association - CakePHP - sqlSQL: View to Table - is it view queries using table indexes? - sqlThe name of the conflict model is ruby-on-railsSafari Browser Does Not Display Error 401 Page - safariHow to run a .exe file using my Webservice? - c #What is the best way to debug explorer.exe crash? - debuggingJava error outside JVM - works on Windows, not Linux - javaIs it possible to run an executable from a web service? - exeWhy is there no pure Python SSH1 implementation (version 1)? - pythonAll Articles