jeudi 8 février 2018

Website works only on localhost, not online

I am trying to work on a website right now (http://www.hlinikove-kufry.cz) and as you can see, the navigation doesn't work. Only thing that changes is the URL, but not the content on the site. I need to fix that. I thought that it is something with HTML/PHP so I downloaded XAMPP to test it out on localhost and I found out that on localhost, the website works just fine. Everything works as it should. I spent the whole day looking for a solution but found nothing. I have no idea what to do so here I am. Suggestions?

I use FTP server to upload files online and XAMPP to try it local as I said. Please know that besides HTML and CSS I know pretty much nothing about this and also I didn't build the website. Thank you for any help.

EDIT: This is .htaccess file from FTP.

# htaccess rules for subdomains and aliases
# to create new subdomain, create a folder www/subdom/(subdomain name)

# to create web for alias, create a folder www/domains/(whole domain name)

# htaccess pravidla pro subdomeny a samostatne weby aliasu
# pro vytvoreni subdomeny vytvorte adresar www/subdom/(nazev subdomeny)
# pro vytvoreni webu pro alias vytvorte adresar www/domains/(cely domenovy nazev)
# dalsi info a priklady: http://kb.wedos.com/r/32/webhosting-htaccess.php

RewriteEngine On


# cele domeny (aliasy)
RewriteCond %{REQUEST_URI} !^domains/
RewriteCond %{REQUEST_URI} !^/domains/
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)$
RewriteCond %{DOCUMENT_ROOT}/domains/%2 -d
RewriteRule (.*) domains/%2/$1 [DPI]

# subdomeny (s nebo bez www na zacatku)
RewriteCond %{REQUEST_URI} !^subdom/
RewriteCond %{REQUEST_URI} !^/subdom/
RewriteCond %{HTTP_HOST} ^(www\.)?(.*)\.([^\.]*)\.([^\.]*)$
RewriteCond %{DOCUMENT_ROOT}/subdom/%2 -d
RewriteRule (.*) subdom/%2/$1 [DPI]

# aliasy - spravne presmerovani pri chybejicim /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^domains/[^/]+/(.+[^/])$ /$1/ [R]

# subdomeny - spravne presmerovani pri chybejicim /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^subdom/[^/]+/(.+[^/])$ /$1/ [R]

#example.com/page will display the contents of example.com/page.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.+)$ $1.php [L,QSA]

#301 from example.com/page.php to example.com/page
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*\.php\ HTTP/
RewriteRule ^(.*)\.php$ /$1 [R=301,L]

#test2
RewriteRule   ^kontakt2$    /kontakt2.php [L,QSA]

Aucun commentaire:

Enregistrer un commentaire