I'm having problems with some PHP code that I implemented on a site. It worked when I handed everything over, but after a few months - probably PHP updates, it stopped working.
In more detail:
It is a bilingual site, and has duplicate HTML files for both languages, e.g.:
.../eng/index.html
.../deu/index.html
To switch between languages, I implemented the following code (this example is from what appears on the EN version):
Code: Select all
<div class="loweAutomobil" id="language">English | <?php $myUrl = "http://".$SERVER_NAME.$REQUEST_URI; $alternativeUrl = preg_replace("/eng/","deu",$myUrl); echo "<a href= ".$alternativeUrl.">Deutsch</a>"; ?></div>
Instead it goes to: http:localhost/
Does anyone have any ideas as to why? How can I fix it?
You can view the site here: http://loeweautomobil.de/eng/index.html
Thank you for your time!