.htaccess - Config version check in Apache -
I am reviving an Apache-PHP application. The main goal is to make it easily portable among hosts. I have moved every path-based setting from .htaccess files to virtualhost specification, but to match the version of the config file in the site's version It would be nice to be able. What I have thought is the two constants defined in the vhost config (such as environment variables) such as: then the central I know that know about SetEnv, SetEnvIf and Rewrite, but they do not support the least number of fonts as compared to the numbers. Of course, I can use a special number system: ... and use RegEx to compare them (if one is more than one in another then this is bigger), but there is something else ... meaningful solution: < /p> Apache can have a comparison of mod_rewrite such as Real Life Example Actions: are pages such as Code: You can compare numbers - this is not correct and the number accordingly It is possible to format .. but it is possible in simple cases. If you can simplify your number (like
less warsense in which this configuration file Compatible with is the lowest version of the application.
highVersion containing
.htaccess file of the application can check whether:
lower version is not bigger than the version of the application and
high quality app is less than the minimum config version required by
id & gt; ; 1234 - This string will be compared as a comparison ( lexicographically prefix and lexicographically low ).
/198655.html . From 152600 and 153655 on all pages, the
/ us / sub-fold and all others need to redirect 301 for the
/ en / subfolder.
Rewrite $ 1> 152600 rewrite $ 1 & lt; 153655 rewriting rule ^ (\ d +) \. Html $ http://www.example.com/us/ $ 1.html [R = 301, L] revised rule ^ (\ d +) \. Html $ http://www.example.com/en/$1.html [R = 301, L]
04> <11> and
4 <11> compare ) then it can work for you.
Comments
Post a Comment