Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 [2]   Go Down

Author Topic: Auto refresh  (Read 13175 times)

0 Members and 1 Guest are viewing this topic.

Fifth Harmony

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Auto refresh
« Reply #20 on: July 30, 2015, 11:58:26 pm »

I added an empty htaccess file but it doesn't work :'(
Logged

gmc

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 785
    • GMC Design Photo Gallery
Re: Auto refresh
« Reply #21 on: July 31, 2015, 12:45:13 am »

Just to be clear... Did you BOTH add a blank .htaccess in the cpg directory AND restore the previous file in the higher level?

If so, is the problem with cpg, wordpress, or both?
Logged
Thanks!
Greg
My Coppermine Gallery
Need a web hosting account? See my gallery for an offer for CPG Forum users.
Send me money

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Auto refresh
« Reply #22 on: July 31, 2015, 10:04:34 am »

As far as I know, a blank .htaccess file has no effect, as you'd need to reset the inherit settings of the .htaccess file. E.g. http://stackoverflow.com/questions/12849703/reset-htacces-for-sub-folders
Logged

Fifth Harmony

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Auto refresh
« Reply #23 on: August 01, 2015, 08:13:52 pm »

Adding a .htaccess (in the sub folder) with
Code: [Select]
RewriteEngine Off
RewriteEngine On
did not work for me...

I'm not sure if I need anything changed in the main .htaccess file?
Code: [Select]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ScreamQueens/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ScreamQueens/index.php [L]
</IfModule>

# END WordPress
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ScreamQueens/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ScreamQueens/index.php [L]
</IfModule>
# END WordPress

# BEGIN wtwp_cache
<IfModule mod_mime.c>

# Text
AddType text/css .css
AddType application/x-javascript .js
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType text/plain .txt
AddType text/xml .xml

# Image
AddType image/gif .gif
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType image/png .png
AddType image/svg+xml .svg .svgz

# Video
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType video/quicktime .mov .qt
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg .mpe

# PDF
AddType application/pdf .pdf

# Flash
AddType application/x-shockwave-flash .swf

# Font
AddType application/x-font-ttf .ttf .ttc
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-otf .otf

# Audio
AddType audio/mpeg .mp3 .m4a
AddType audio/ogg .ogg
AddType audio/wav .wav
AddType audio/wma .wma

# Zip/Tar
AddType application/x-tar .tar
AddType application/x-gzip .gz .gzip
AddType application/zip .zip
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On

# Text
ExpiresByType text/css A31536000
ExpiresByType application/x-javascript A31536000
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType text/plain A3600
ExpiresByType text/xml A3600

# Image
ExpiresByType image/gif A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType image/png A31536000
ExpiresByType image/svg+xml A31536000

# Video
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000

# PDF
ExpiresByType application/pdf A31536000

# Flash
ExpiresByType application/x-shockwave-flash A31536000

# Font
ExpiresByType application/x-font-ttf A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType application/x-font-otf A31536000

# Audio
ExpiresByType audio/mpeg A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000

# Zip/Tar
ExpiresByType application/x-tar A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType application/zip A31536000
</IfModule>
<FilesMatch "\.(?i:css|js|htm|html|rtf|rtx|txt|xml|gif|ico|jpg|jpeg|jpe|png|svg|svgz|asf|asx|wax|wmv|wmx|avi|mov|qt|mp4|m4v|mpeg|mpg|mpe|pdf|swf|ttf|ttc|eot|otf|mp3|m4a|ogg|wav|wma|tar|gz|gzip|zip)$">
<IfModule mod_headers.c>
Header set Pragma "public"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
Header unset ETag
</IfModule>
</FilesMatch>
<FilesMatch "\.(?i:css|js|gif|ico|jpg|jpeg|jpe|png|pdf|swf|ttf|ttc|eot|otf)$">
    <IfModule mod_headers.c>
Header unset Set-Cookie
</IfModule>
</FilesMatch>
# END wtwp_cache

# BEGIN wtwp_security
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ScreamQueens/
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>
<Files "wp-config.php">
Order allow,deny
Deny from all
</Files>
Options -Indexes
# END wtwp_security
[/quote]
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: Auto refresh
« Reply #24 on: August 02, 2015, 10:10:55 am »

This part of your wordpress .htaccess is chache your content (that's way you have to refresh the page to see the new content) :

Code: [Select]
# BEGIN wtwp_cache
<IfModule mod_mime.c>

# Text
AddType text/css .css
AddType application/x-javascript .js
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType text/plain .txt
AddType text/xml .xml

# Image
AddType image/gif .gif
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType image/png .png
AddType image/svg+xml .svg .svgz

# Video
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType video/quicktime .mov .qt
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg .mpe

# PDF
AddType application/pdf .pdf

# Flash
AddType application/x-shockwave-flash .swf

# Font
AddType application/x-font-ttf .ttf .ttc
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-otf .otf

# Audio
AddType audio/mpeg .mp3 .m4a
AddType audio/ogg .ogg
AddType audio/wav .wav
AddType audio/wma .wma

# Zip/Tar
AddType application/x-tar .tar
AddType application/x-gzip .gz .gzip
AddType application/zip .zip
</IfModule>

<IfModule mod_expires.c>
ExpiresActive On

# Text
ExpiresByType text/css A31536000
ExpiresByType application/x-javascript A31536000
ExpiresByType text/html A3600
ExpiresByType text/richtext A3600
ExpiresByType text/plain A3600
ExpiresByType text/xml A3600

# Image
ExpiresByType image/gif A31536000
ExpiresByType image/x-icon A31536000
ExpiresByType image/jpeg A31536000
ExpiresByType image/png A31536000
ExpiresByType image/svg+xml A31536000

# Video
ExpiresByType video/asf A31536000
ExpiresByType video/avi A31536000
ExpiresByType video/quicktime A31536000
ExpiresByType video/mp4 A31536000
ExpiresByType video/mpeg A31536000

# PDF
ExpiresByType application/pdf A31536000

# Flash
ExpiresByType application/x-shockwave-flash A31536000

# Font
ExpiresByType application/x-font-ttf A31536000
ExpiresByType application/vnd.ms-fontobject A31536000
ExpiresByType application/x-font-otf A31536000

# Audio
ExpiresByType audio/mpeg A31536000
ExpiresByType audio/ogg A31536000
ExpiresByType audio/wav A31536000
ExpiresByType audio/wma A31536000

# Zip/Tar
ExpiresByType application/x-tar A31536000
ExpiresByType application/x-gzip A31536000
ExpiresByType application/zip A31536000
</IfModule>
<FilesMatch "\.(?i:css|js|htm|html|rtf|rtx|txt|xml|gif|ico|jpg|jpeg|jpe|png|svg|svgz|asf|asx|wax|wmv|wmx|avi|mov|qt|mp4|m4v|mpeg|mpg|mpe|pdf|swf|ttf|ttc|eot|otf|mp3|m4a|ogg|wav|wma|tar|gz|gzip|zip)$">
<IfModule mod_headers.c>
Header set Pragma "public"
Header append Cache-Control "public, must-revalidate, proxy-revalidate"
Header unset ETag
</IfModule>
</FilesMatch>
<FilesMatch "\.(?i:css|js|gif|ico|jpg|jpeg|jpe|png|pdf|swf|ttf|ttc|eot|otf)$">
    <IfModule mod_headers.c>
Header unset Set-Cookie
</IfModule>
</FilesMatch>
# END wtwp_cache

Try adding to  ScreamQueens/gallery/.htaccess:

Code: [Select]
RewriteEngine Off
RewriteEngine On
<IfModule mod_expires.c>
ExpiresActive On

# Text
ExpiresByType text/css A0
ExpiresByType application/x-javascript A0
ExpiresByType text/html A0
ExpiresByType text/richtext A0
ExpiresByType text/plain A0
ExpiresByType text/xml A0

# Image
ExpiresByType image/gif A0
ExpiresByType image/x-icon A0
ExpiresByType image/jpeg A0
ExpiresByType image/png A0
ExpiresByType image/svg+xml A0

# Video
ExpiresByType video/asf A0
ExpiresByType video/avi A0
ExpiresByType video/quicktime A0
ExpiresByType video/mp4 A0
ExpiresByType video/mpeg A0

# PDF
ExpiresByType application/pdf A0

# Flash
ExpiresByType application/x-shockwave-flash A0

# Font
ExpiresByType application/x-font-ttf A0
ExpiresByType application/vnd.ms-fontobject A0
ExpiresByType application/x-font-otf A0

# Audio
ExpiresByType audio/mpeg A0
ExpiresByType audio/ogg A0
ExpiresByType audio/wav A0
ExpiresByType audio/wma A0

# Zip/Tar
ExpiresByType application/x-tar A0
ExpiresByType application/x-gzip A0
ExpiresByType application/zip A0
</IfModule>

This way the chache will last 0 seconds (A0)

or you can try adding:

Code: [Select]
RewriteEngine Off
RewriteEngine On
ExpiresDefault A0
Header append Cache-Control "gallery"

As you can see he is caching all kind of content from all images type to html, txt, css etc.

http://www.askapache.com/hacking/speed-site-caching-cache-control.html
« Last Edit: August 02, 2015, 10:16:30 am by allvip »
Logged

Fifth Harmony

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: Auto refresh
« Reply #25 on: August 02, 2015, 02:02:54 pm »

Worked for me. Thanks a lot for all the help!  :D
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.02 seconds with 19 queries.