Copy link to clipboard
Copied
Hi,
Yesterday I launched my client's new site, everything works but the page called www.norrbilar.se/service.php (site is www.norrbilar.se) and on clicking the link, or writing the address in browser, I get the index page. Any help would be greatly appreciated!
Best Regards, Carolin
Code is here:
<!DOCTYPE html> | |
<?php | |
$get_form_info = 1; | |
$afp_form_id = 1; | |
include 'ajax/ajax-form-app/common.php'; | |
$afp->mLightbox = 1; | |
?> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bilverkstad, service & reparationer | Norrbilar i Eskilstuna</title> | |
<meta name="description" content="På Norrbilar i Eskilstuna har vi bilverkstad där vi genomför service och reparationer på din bil. Välkommen in till vår bilverkstad."> | |
<meta name="keywords" content="bilverkstad serviceverkstad eskilstuna"> | |
<!-- Bootstrap --> | |
<link href="css/main.css" rel="stylesheet"> | |
<link href="css/bootstrap.css" rel="stylesheet"> | |
<?php | |
$afp->Init(); | |
?> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i | |
(i | |
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-50424376-1', 'auto'); | |
ga('send', 'pageview'); | |
</script> | |
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |
<!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | |
<!--[if lt IE 9]> | |
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> | |
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> | |
<![endif]--> | |
</head> | |
<body> | |
<div class="container"> | |
<nav class="navbar navbar-default"> | |
<div class="container-fluid"> | |
<!-- Brand and toggle get grouped for better mobile display --> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#defaultNavbar1" aria-expanded="false"><span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span><span class="icon-bar"></span></button> | |
<a class="navbar-brand" href="index.html"><img src="bilder/Logo.png" width="300" height="45" alt=""/></a></div> | |
<!-- Collect the nav links, forms, and other content for toggling --> | |
<div class="collapse navbar-collapse" id="defaultNavbar1"> | |
<ul class="nav navbar-nav"> | |
<li class="active"></li> | |
<li></li> | |
</ul> | |
<form class="navbar-form navbar-left" role="search"> | |
<div class="form-group"> </div> | |
</form> | |
<ul class="nav navbar-nav navbar-right"> | |
<li><a href="kampanjer.html">KAMPANJER</a></li> | |
<li><a href="bilar.html">NYA BILAR</a></li> | |
<li><a href="lager.html">BILAR I LAGER</a></li> | |
<li><a href="service.php">SERVICEVERKSTAD</a></li> | |
<li><a href="kontakt.php">KONTAKTA OSS</a></li> | |
</ul> | |
</div> | |
<!-- /.navbar-collapse --> | |
</div> | |
<!-- /.container-fluid --> | |
</nav> | |
<article class="content"> | |
<h1>Bilverkstad & Service i Eskilstuna</h1> | |
<div id="tracer"> | |
<p style="margin: 2px;">Är din bil färdigservad?</p> | |
<form action="http://www.tracer.nu/bilteam/status" method="post"> | |
<input name="verkstadId" type="hidden" value="11" /> | |
<input name="external" type="hidden" value="1" /> | |
<input name="regnr" type="text" id="regnr" maxlength="8" /> | |
<input type="submit" value="Sök" /> | |
</form></div></p> | |
<div class="row"> | |
<div class="col-sm-12 artwork-3"><span style="color: #fff"> | |
<h2>Service och reparationer</h2> | |
<p>Är din bil i behov av service eller reparation av en riktig bilverkstad? Lämna din bil hos oss på Norrbilars bilverkstad i Eskilstuna. Vi har god kompetens, de rätta verktygen, samt lång erfarenhet i branschen. Vi är auktoriserade för Citroën, Fiat & Fiat Professional, | |
Jeep, Chrysler och Dodge.</p> | |
<a href="http://shop.citroen.se/sv/eskilstuna-norrbilar-i-eskilstuna-ab" target="_blank"><p>Här kan du beställa tillbehör till din bil! >></p></a> | |
</div> | |
<div class="row"> | |
<div class="col-md-3"> | |
<div class="thumbnail"><img src="bilder/Jan-Pettersson.jpg" alt="Thumbnail Image 1" class="img-responsive"> | |
<div class="caption"> | |
<h4>Jan Pettersson<br> | |
Kundrådgivare </h4> | |
</div> | |
</div> | |
</div> | |
<div class="col-md-3"> | |
<div class="thumbnail"><img src="bilder/Per-Larsson.jpg" alt="Thumbnail Image 1" class="img-responsive"> | |
<div class="caption"> | |
<h4>Per Larsson<br> | |
Tekniker</h4> | |
</div> | |
</div> | |
</div> | |
<div class="col-md-3"> | |
<div class="thumbnail"><img src="bilder/Fredrik-Gutafsson.jpg" alt="Thumbnail Image 1" class="img-responsive"> | |
<div class="caption"> | |
<h4>Fredrik Gustafsson<br> | |
Tekniker</h4> | |
</div> | |
</div> | |
</div> | |
<div class="col-md-3"> | |
<div class="thumbnail"><img src="bilder/Henrik-Lundin.jpg" alt="Thumbnail Image 1" class="img-responsive"> | |
<div class="caption"> | |
<h4>Henrik Lundin<br> | |
Servicemarknadschef</h4> | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="row"> | |
<div class="col-md-4"><h2>Här bokar du din service-tid!</h2> | |
<p>Fyll i uppgifterna i formuläret, så kontaktar vi dig för att bekräfta din bokning.<br> | |
Var vänlig boka minst 14 dagar före önskad tid.</p><p><button class='afp_lightbox afp<?php echo $afp_form_id; ?>' style='padding:10px;'><?php echo $afp_form_title; ?></button></p> | |
</div> | |
<div class="col-md-4"><h3>Rekonditionering</h3> | |
<p><img class="img-space" src="bilder/Erik-Hellsten-Rekond.jpg" align="left">Lacken på din bil utsätts hela tiden för skadliga ämnen, såsom salt, asfalt, fågelexkrementer och andra kemikalier. Dessa gör att ytskiktet oxiderar, vilket leder till att lacken förlorar sin glans. Genom att regelbundet rengöra billacken, behåller man lackens glansighet. Vi ombesörjer alla former av rekonditionering, bl.a. invändig och utvändig tvätt, polering, vaxning och lackförsegling.</p></div> | |
<div class="col-md-4"><h3>Däckförvaring</h3></div> | |
<p><img class="img-space" src="bilder/dack.png" align="left">Ont om plats i garaget? | |
Hos oss kan du förvara dina hjul för 695 kr per säsong (maj – oktober eller november – april). | |
I kostnaden ingår hjulbyte, kontroll av mönsterdjup och lufttryck, samt tvätt av fälgar. | |
</p> | |
</div> | |
<div class="row footer"> | |
<table width="100%" cellpadding="2" cellspacing="2" class="footertabell" itemscope itemtype="http://schema.org/LocalBusiness"> | |
<tr> | |
<td width="25%"><b itemprop="name">Norrbilar i Eskilstuna AB</b></td> | |
<td width="25%"><b itemprop="telephone">Telefon: 016-12 58 00</b></td> | |
<td width="25%"><b>Öppettider Försäljningen:</b></td> | |
<td width="25%"><b>Öppettider Verkstaden:</b></td> | |
</tr> | |
<tr> | |
<td width="25%" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress"><span itemprop="streetAddress">Gustafsvägen 5 </span><br><span itemprop="postalCode"> 633 46 </span><span itemprop="addressLocality">Eskilstuna</span></td> | |
<td width="25%"> </td> | |
<td width="25%"><span itemprop="openingHours" content="Mo-Th 10:00-18:00">Måndag - Torsdag: 10.00 - 18.00 </span><br><span itemprop="openingHours" content="Fr 10:00-17:00">Fredag: 10.00 - 17.00</span><br><span width="25%" itemprop="openingHours" content="Sa 11:00-14:00">Lördag: 11.00 - 14.00</span></td> | |
<td width="25%" style="vertical-align: top;">MÃ¥ndag - Fredag: 07.30 - 17.00</td> | |
</tr> | |
</table> | |
<h6 class="text-center">©2017 Norrbilar</h6> | |
<p align="center"><img src="bilder/Logo2.png" class="img-responsive"></p> | |
</div> | |
</div> | |
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) --> | |
<script src="js/jquery-1.11.3.min.js"></script> | |
<!-- Include all compiled plugins (below), or include individual files as needed --> | |
<script src="js/bootstrap.js"></script> | |
</body> | |
</html> |
Another clue...
Normally when one tries to take a look at a directory online, you get a 403 Access Forbidden message or custom 403 page. When I look at your "bilder" folder for example by browsing directly to it, I'm redirected to the home page as well, rather than seeing the server-generated forbidden message, or custom error page.
That could mean you have ALL errors set to redirect to the home page.
If that were the case, a simple permissions goof-up could cause what you're seeing.
For example, th
...Copy link to clipboard
Copied
What happens if you remove the php code from the page........?
<?php | |
$get_form_info = 1; | |
$afp_form_id = 1; | |
include 'ajax/ajax-form-app/common.php'; | |
$afp->mLightbox = 1; | |
?> |
<?php | |
$afp->Init(); | |
?> |
Copy link to clipboard
Copied
I tried to remove the php-code now and uploaded it again, and still nothing happens. This is so strange, has never happened before. The page is where it should be, together with the other ones, and I've done pretty much as I do with my other sites, but for some reason this won't work. The other php-file that I uploaded is working fine.
Copy link to clipboard
Copied
I'm thinking more along the lines of what Jon suggested now - that the page can't be found for some reason and you have a rather confusing way of identifying that to the website user by the way of any page not found on the server gets redirected back to the home page.
What happens for instance, as a test, if you duplicate the kontakt.php file (you know that works) and rename it kontact_2.php, upload that to the server and test that it can be reached in a broswer by typing the url directly into the browser url field. If it can be found then replace all the code with the code from your services page, dont rename the file yet, upload to the server and try and get to it directly by typing the url into a broswer url address bar, what happens?
Copy link to clipboard
Copied
Thank you!
I did as you recommended, renamed the kontakt.php, and it worked, replaced the code, still worked, renamed it back to service.php - didn't work... However, I changed the links all over the page, so now the service.php is simply called kontakt_2.php Thank you so much!
Carolin
Copy link to clipboard
Copied
Carro000 wrote
Thank you!
I did as you recommended, renamed the kontakt.php, and it worked, replaced the code, still worked, renamed it back to service.php - didn't work... However, I changed the links all over the page, so now the service.php is simply called kontakt_2.php Thank you so much!Carolin
Glad it worked but something weird is going on. I would still investigate further at some stage.
Copy link to clipboard
Copied
Hi John,
Yes, the service.php page is uploaded, in the same location as the other files. No change in structure, naming etc.
Thanks for the tip about .php / html, the only reason I use .php on the service and contact pages is because I have this ajax script for form-mail. But it's so weird, I'm using the same setup for www.wnbil.se/verkstad.php, and it works very well. And the contact page on this site is working fine as well. I have tried to remove all the php-code and upload it again, but it still gives the same result. Thanks for trying
Copy link to clipboard
Copied
And also, if I go via the ftp, I can find the page:
Copy link to clipboard
Copied
Another clue...
Normally when one tries to take a look at a directory online, you get a 403 Access Forbidden message or custom 403 page. When I look at your "bilder" folder for example by browsing directly to it, I'm redirected to the home page as well, rather than seeing the server-generated forbidden message, or custom error page.
That could mean you have ALL errors set to redirect to the home page.
If that were the case, a simple permissions goof-up could cause what you're seeing.
For example, the services.php page is uploaded, to the right location, but if Read access wasn't set correctly, for some strange reason, it would normally throw an "Access Denied" error and give a few possible reasons for the error along with a "talk to your administrator" message. However, if all errors are set to redirect, it would just go to the home page as we're seeing now.
Long story short, a quick chat with your hosting company might reveal the issue.
Copy link to clipboard
Copied
Has the service.php page been uploaded?
Has it been uploaded to the correct location (in the same directory as the index.php)?
Is there any change in the case structure of the file name between the link and the actual file (service.php vs Service.php?
I ask because throwing in a random page name at the end of your domain gives the same result, the home page comes up. Looks to me like you have a redirect to the home page happening for your 404 (File Not Found). It may be that you've uploaded service.php to the wrong location, or forgot to upload it and your site is just redirecting to the home page as instructed by an htaccess file.
I also notice you have some .php pages and some .html. It would probably be best if you make all of your pages .php, even if they don't use any PHP right now. You never know if that will change in the future.