0

I am working on a website and I was trying to redesign it.

I edited the style of the header portion of the site and uploaded the "styles.css" file to the remote site via filezilla but doesn't show any changes in the website.

But when I tried to write "www.mywebsitename.com/styles.css" in the address bar (which is quite a stupid thing to do :/ ) It shows me a 404 error page but with the changes I made in the header portion of the code. This is quite weird.

The structure.php file links to the css file like below :

<link rel="stylesheet" href="/inc/styles.css?56" type="text/css">

and the structure404.php file links to the css file like below :

<link rel="stylesheet" href="/inc/styles.css?60" type="text/css">

I am not used to of this type of css linking "styles.css?60" or "styles.css?56", what does it mean..?? I was wondering if it has something to do with the above mentioned problem.

The structre.php file of the project :

<?php

if(!preg_match("/\/lyrics\//",$REQUEST_URI)){$charEncode="iso-8859-1";}



$icerikk= "<!DOCTYPE html>

<html lang=\"en\">

<head>

<title>".$pagetitle."</title>

\n<meta name=\"viewport\" content=\"width=device-width\">

<META name=\"description\" content=\"".$metadesc."\">

<META name=\"keywords\" content=\"".$metakw.".\">

".$addmeta."



<link rel=\"stylesheet\" href=\"/inc/styles.css?56\" type=\"text/css\">

<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$charEncode\">



<script>

  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),

  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)

  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');



  ga('create', 'UA-1022817-7', 'auto');

  ga('send', 'pageview');



</script>



<script type='text/javascript' src='//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js' data-shr-siteid='c0f4c4a7360d12a21d0c810f66dc29b1' data-cfasync='false' async='async'></script>



</head>

<body>";



/*<div id='h1'><h1>".$metakw."</h1></div>*/

$icerikk.="

<center>



<div class='t1'>

<a href=\"/\"><img alt=\"LyricsKid\" src=\"/images/logo3.png\">&nbsp;</a>



</div>



<div class='top_bar'>



<div class='google_search'>



<form action=\"/inc/search.php\" method=\"GET\" name=\"searchform\">

<input class=\"input\" type=\"text\" value=\"Search for an Artist, Song or Lyrics\" name=\"qry\" id=\"inputString\" onkeyup=\"lookup(this.value);\" onblur=\"fill();\" 

onfocus=\"if(!this._haschanged){this.value=''};this._haschanged=true;\" autocomplete=\"off\">

<input type=\"submit\" value='SEARCH' class='src' id='src'>

</form>



</div>



";



$icerikk.="



</div>";



/*

<script type=\"text/javascript\">

var width=window.screen.width;if(width<=640){document.write(\"<div id='admob300'></div>\");}

else{document.write(\"<div id='ad728'></div>\");}</script>

*/



if(!preg_match("/^\/songs\/|^\/artist\/|^\/$/",$REQUEST_URI))

{       

echo"".$addscript."";

}

$icerikk.="

<div class='t2'>

    <div class='cont'>  

            $content

        <div class=\"browse\">

            <b>Browse:</b>

            <a href=\"/artist/a.html\">A</a>

            <a href=\"/artist/b.html\">B</a>

            <a href=\"/artist/c.html\">C</a>

            <a href=\"/artist/d.html\">D</a>

            <a href=\"/artist/e.html\">E</a>

            <a href=\"/artist/f.html\">F</a>

            <a href=\"/artist/g.html\">G</a>

            <a href=\"/artist/h.html\">H</a>

            <a href=\"/artist/i.html\">I</a>

            <a href=\"/artist/j.html\">J</a>

            <a href=\"/artist/k.html\">K</a>

            <a href=\"/artist/l.html\">L</a>

            <a href=\"/artist/m.html\">M</a>

            <a href=\"/artist/n.html\">N</a>

            <a href=\"/artist/o.html\">O</a>

            <a href=\"/artist/p.html\">P</a>

            <a href=\"/artist/q.html\">Q</a>

            <a href=\"/artist/r.html\">R</a>

            <a href=\"/artist/s.html\">S</a>

            <a href=\"/artist/t.html\">T</a>

            <a href=\"/artist/u.html\">U</a>

            <a href=\"/artist/v.html\">V</a>

            <a href=\"/artist/w.html\">W</a>

            <a href=\"/artist/x.html\">X</a>

            <a href=\"/artist/y.html\">Y</a>

            <a href=\"/artist/z.html\">Z</a>

            <a href=\"/artist/0-9.html\">#</a>

        </div>

    </div>





</div>";

/*

            <script type=\"text/javascript\">

            var width=window.screen.width;if(width<=640){document.write(\"<div id='admob300_2'></div>\");}

            else{document.write(\"<div id='ad160'></div>\");}</script>

*/



$finish=microtime_float();

$timecount=round($finish - $start, 3);

$today = getdate(); $year = $today['year'];



$icerikk.="

        <div class='bottom_data'>

            <font style=\"color:#000000;font-size:12px;font-family:tahoma;\">Copyright (c) 2005 - ".$year." LyricsKid ($timecount seconds)</font>$cal<br>

        </div>

        <div class='bottom_data'>

            <a href=\"/inc/privacy.php\" class=\"link_grey_dark\">Privacy</a>&nbsp;&nbsp;

            <a href=\"/inc/DMCA.php\" class=\"link_grey_dark\">DMCA Policy</a>&nbsp;&nbsp;

            <a href=\"/inc/contact.php\" class=\"link_grey_dark\">Contact Us</a>&nbsp;&nbsp;

            <a href=\"/inc/about.php\" class=\"link_grey_dark\">About Us</a>&nbsp;&nbsp;

            ";

            if($REQUEST_URI=="/")

            {

                $icerikk.="|  <a style=\"font-size:12px;color:#a0522d;\" href=\"/top100.php\"> Top 100</a>";

            }

$icerikk.="         

        </div>  

</center>



<script type=\"text/javascript\" src=\"https://s7.addthis.com/js/300/addthis_widget.js#pubid=oarsman\"> </script>

";



$icerikk.="

</body>

</html>";

$icerikk.= "

<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js\"></script>

<script>$(\"#ad300\").html('<iframe src=\'/inc/300.html\' width=\'300\' height=\'250\' frameborder=\'0\' scrolling=\'no\'>');</script>

<script>$(\"#admob300\").html('<iframe src=\'/inc/300.html\' width=\'300\' height=\'250\' frameborder=\'0\' scrolling=\'no\'>');</script>

<script>$(\"#admob300_2\").html('<iframe src=\'/inc/300.html\' width=\'300\' height=\'250\' frameborder=\'0\' scrolling=\'no\'>');</script>

<script>$(\"#ad160\").html('<iframe src=\'/inc/160.html\' width=\'160\' height=\'600\' frameborder=\'0\' scrolling=\'no\'>');</script>

<script>$(\"#ad728\").html('<iframe src=\'/inc/728.html\' width=\'728\' height=\'90\' frameborder=\'0\' scrolling=\'no\'>');</script>

<script>$(\"#mgid300\").html('<iframe src=\'/inc/mgid_300.html\' width=\'300\' height=\'250\' frameborder=\'0\' scrolling=\'no\'>');</script>

<script>$(\"#am_widget\").html('<iframe src=\'/inc/amz.html\' width=\'250\' height=\'250\' frameborder=\'0\' scrolling=\'no\'>');</script>

<script>$(\"#h12300\").html('<iframe src=\'/inc/h12_300.html\' width=\'300\' height=\'250\' frameborder=\'0\' scrolling=\'no\'>');</script>

";

echo $icerikk;

?>

and the .htaccess file :

AcceptPathInfo On
Options -Indexes
Options +FollowSymlinks
RewriteEngine On

######################################
RewriteCond %{HTTP_HOST} !^(www|inc)\.mywebsitename.com [nc]
RewriteRule (.*) https://www.mywebsitename.com/$1 [R=301,L]
######################################

#CDN kullanimini bypass edecek subdomain
RewriteCond %{HTTP_HOST} ^inc\.mywebsitename\.com$ [NC]
RewriteCond %{REQUEST_URI} !^/inc/
RewriteRule ^(.*)$ /inc/$1 [L]

######################################
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /inc/404.php [L,NS]
######################################

# BEGIN Gzip

<IfModule mod_deflate.c>
# force deflate for mangled headers 
# developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
<IfModule mod_setenvif.c>
  <IfModule mod_headers.c>
    SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
    RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  </IfModule>
</IfModule>

# HTML, TXT, CSS, JavaScript, JSON, XML, HTC:
<IfModule filter_module>
  FilterDeclare   COMPRESS
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/html
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/css
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/plain
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/xml
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $text/x-component
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/javascript
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/json
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xml
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/xhtml+xml
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/rss+xml
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/atom+xml
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/vnd.ms-fontobject
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $image/svg+xml
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $application/x-font-ttf
  FilterProvider  COMPRESS  DEFLATE resp=Content-Type $font/opentype
  FilterChain     COMPRESS
  FilterProtocol  COMPRESS  DEFLATE change=yes;byteranges=no
</IfModule>

<IfModule !mod_filter.c>
  # Legacy versions of Apache
  AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
  AddOutputFilterByType DEFLATE application/javascript
  AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
  AddOutputFilterByType DEFLATE application/xhtml+xml application/rss+xml application/atom+xml
  AddOutputFilterByType DEFLATE image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype
</IfModule>
</IfModule>

# END Gzip

<FilesMatch "^(artist|songs|lyrics|ad_default)$">
ForceType application/x-httpd-php
</FilesMatch>

ErrorDocument 400 /inc/404.php

<FilesMatch "\.(gif|jpg|png|bmp|ico|js|swf|css)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

Any help will be highly appreciated. Thanks in advance.

user3325349
  • 51
  • 1
  • 6
  • Are you using any CMS like WordPress or Joomla? Can you compare desired content css to content of `www.mywebsitename.com/inc/styles.css`? – Maxim Mazurok Dec 25 '15 at 10:49
  • Hi, no, I am not using any CMS.Yes I can compare them. – user3325349 Dec 25 '15 at 10:54
  • It seems like styles.css redirecting to a script and `?56` and `?60` is `GET`-parameters. Maybe indicates version of styles.css. Can you provide a structure of project? If you have any `.htaccess` files in project - their content also may help. – Maxim Mazurok Dec 25 '15 at 10:57
  • http://shouldiblamecaching.com/ – ndugger Dec 25 '15 at 10:59
  • @user3325349 as mentioned above by others, it is a bad way to handle caching. I believe that if you will clear your browser cache and retry to load your website, than you will see your fresh styles. Also try to change `/inc/styles.css?56` to `/inc/styles.css?60` or something stupid, like `/inc/styles.css?123456789`, it doesn't really matter. Tell me please if it works and I will post it as an answer. – Maxim Mazurok Dec 25 '15 at 11:22
  • I tried clearing the browser cache and also refreshing the webpage before, but it didn't work. Now I tried it again, but it's still the same. I also changed /inc/styles.css?56 to /inc/styles.css?60, but still no luck. :( Thanks for your patience to answer my question anyway,,, :) @MaximMazurok – user3325349 Dec 25 '15 at 11:49

0 Answers0