PHP code to remove /mobile from line -


I am using Reliance Energy option on my main site, UK site and Australia site, but it works on my mobile Site will not because I need to remove / mobile from the line,

My mobile directory is: www.URL.com/mobile/

When I enter this code: / P>

  & lt; Link rel = "alternate" href = "http: //www.URL.co.uk< ?? php echo parse_url ($ _ SERVER ['REQUEST_URI'], PHP_URL_PATH);? & Gt; Hreflang = "en-uk" />  

It is shown as www.URL.co.uk/mobile/category-honda.html I need to see it at www.URL.co.uk/category-honda .html

How to remove

  / mobile  

any help thanks

< Div class = "post -text" itemprop = "text">

  & lt ;? Php $ link = 'http: //www.URL.co.uk'parse_url ($ _SERVER [' REQUEST_URI '], PHP_URL_PATH); $ Link = str_replace ('Mobile', '', $ link); ? & Gt; & Lt; Link rel = "alternate" href = "& lt ;? php echo $ link ;? gt;" Hreflang = "en-uk" />  

Here you go to Stephen.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -