Changeset 1842014
- Timestamp:
- 03/17/2018 08:01:40 PM (8 years ago)
- Location:
- flexistatic/trunk
- Files:
-
- 2 edited
-
flexistatic.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
flexistatic/trunk/flexistatic.php
r1561220 r1842014 122 122 // if index.html get preference. E.g. the very usefull "Simple Custom CSS". 123 123 echo "<p>".__('Attention: Some more ore less usefull plugins do need direct requests to the <code>index.php</code> in the blog root folder. Therefor you should add','flexistatic')," "; 124 $SUBDIR="FR/"; // rtzrtz: must end with an "/" 124 125 echo "<pre> # FlexiStatic 126 # first make shure that we do not match 127 # requests with dynamic parameters. Also 128 # make sure that the webserver prefers 129 # 'index.html' over directory listing 125 130 RewriteEngine On 126 RewriteCond %{REQUEST_URI} ^/(index|%{HTTP_HOST})\.html 131 132 RewriteBase /".$SUBDIR." 133 RewriteCond %{REQUEST_URI} (index|%{HTTP_HOST})\.html$ 127 134 RewriteCond %{QUERY_STRING} !^$ 128 135 RewriteRule . /index.php [L]</pre>"; 129 136 echo "<pre> ### only needed for WPMU ### 130 RewriteCond %{REQUEST_FILENAME} /$ 131 RewriteCond %{DOCUMENT_ROOT}/%{HTTP_HOST}.html -f 137 RewriteCond %{REQUEST_URI} ^/".$SUBDIR."$ 138 RewriteCond %{QUERY_STRING} ^$ 139 RewriteCond %{DOCUMENT_ROOT}/".$SUBDIR."%{HTTP_HOST}.html -f 132 140 RewriteRule .* %{HTTP_HOST}.html [L] 133 141 # END FlexiStatic 134 142 </pre>"; 143 135 144 printf ( __("to your <code>%s/.htaccess</code> file.",'flexistatic'), $_SERVER['DOCUMENT_ROOT'].wp_make_link_relative(get_site_url()) ); 136 145 echo "</p>"; … … 253 262 rename($path,$path.'static3UU'); 254 263 // request the dynamit content from WP 255 $content2=file_get_contents(get_site_url().$wsfile)."<!-- static3UU|autocreate -->";264 $content2=file_get_contents(get_site_url().$wsfile)."<!-- static3UU|autocreate|$wsfile -->"; 256 265 // if we had have an old static dir, we move it back 257 266 if(is_dir($path.'static3UU')) rename($path.'static3UU',$path); -
flexistatic/trunk/readme.txt
r1561220 r1842014 3 3 Tags: static page, performance 4 4 Requires at least: 4.4 5 Tested up to: 4. 76 Stable tag: 2.0. 15 Tested up to: 4.9.4 6 Stable tag: 2.0.2 7 7 License: MIT 8 8 License URI: http://opensource.org/licenses/mit … … 58 58 time. 59 59 60 = Q: My browser start a "download" if request a static file =61 A: If your permalinks are defined as directories, the webserver can not62 know the MIME type of the static file. It is up to you that your63 webserver will send the correct headers.64 65 60 = Q: I get security warnings of the browser if I request a static file = 66 61 A: If your server support http and https please make sure to create the … … 99 94 100 95 == Changelog == 96 97 = 2.0.2 = 98 - optimize RewriteRules to work with installations in subdirs 101 99 102 100 = 2.0.1 =
Note: See TracChangeset
for help on using the changeset viewer.