1

I'm having the following problem: I setted the cronjob every 5 minutes to execute a php script I have in my public_html folder and every time it tries to execute it, I get the next thing (errors r being sent on my mail):

Status: 302 Moved Temporarily
Set-Cookie: ava=sdasdasf1wfsadads; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Location:http://localhost/myhostname.com/web/
Content-type: text/html; charset=UTF-8

I'm using the following cmd for the cron job: php /home/xxxx/public_html/_fnewsletter.php

Also, I want to redirect every user to the https:// version of the page using htaccess and use upgrade-insecure-requests correctly using htaccess

Here is my htaccess file:

   #Options +FollowSymLinks +ExecCGI

<IfModule mod_rewrite.c>
  RewriteEngine On

  # uncomment the following line, if you are having trouble
  # getting no_script_name to work
  #RewriteBase /

#RewriteCond %{REMOTE_ADDR} !^xxx\.xx\.xx\.xxx #ignore the xxx-s , its just an IP
#RewriteCond %{REQUEST_URI} !^/splash\.html$
#RewriteRule ^(.*)$ /splash.html [R=307,L]


  # we skip all files with .something
  #RewriteCond %{REQUEST_URI} \..+$
  #RewriteCond %{REQUEST_URI} !\.html$
  #RewriteRule .* - [L]

  RewriteCond %{HTTP_HOST} !^www\.(.*)$ [NC]
  RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]  



  # we check if the .html version is here (caching)
  RewriteRule ^$ index.html [QSA]
  RewriteRule ^([^.]+)$ $1.html [QSA]
  RewriteCond %{REQUEST_FILENAME} !-f

  # no, so we redirect to our front web controller
  RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
Cœur
  • 37,241
  • 25
  • 195
  • 267
ManHelio
  • 11
  • 1

0 Answers0