Stop changing of urls
Apr 12, 2012 12:08 pm by eustahije
Apr 12, 2012 12:08 pm by eustahije
Hey, I'm stuck on this for more that 5 hours now.
I have absolute url on site (site.com/assets/style.css)
How I mark that link (<link href="http://site.com/assets/style.com" />)
not to change (strip domain part)
I have tried with class, but it seems that is not working (same goes for change language)
href="http://site.com/iw/ is changed to href="iw"
I WANT to use absolute URL, dont want some jaba jaba relative paths or anything like that. I dont want <base> tag to define where to go. I only need to exclude link and a from been converted.
Is there a way to do so ?
And that is working!
Re: Stop changing of urls
Apr 12, 2012 2:21 pm by eustahije
Apr 12, 2012 2:21 pm by eustahije
Can I pls get any reply on this ?
tnx
Re: Stop changing of urls
Apr 12, 2012 5:56 pm by Yana
Apr 12, 2012 5:56 pm by Yana
Hi,
Sorry ,but I don't understand what you mean. Could you please post your website address and try to explain more clearly what you want to do?
Re: Stop changing of urls
Apr 17, 2012 1:03 pm by eustahije
Apr 17, 2012 1:03 pm by eustahije
Hi Yana.
This is the thing.
I crate link href to lead on http://www.domain.com/assets/css/style.css and when page is not translated that url seems fine in source (it is link tag)
when I go on www.domain.com/es/
that same href look like assets/css/style.css (http://www.domain.com/ part has been striped).
I was looking on a way to use absolute url without those urls being writed (striped) by gtranslate.
I tried with class="nturl" but no luck, that href path is still striped.
Is there a way to keep absolute urls in href and src paths (link and a tags) without those urls being stripped.
Tnx
Re: Stop changing of urls
Apr 17, 2012 2:32 pm by eustahije
Apr 17, 2012 2:32 pm by eustahije
other example (I tried with relative URL - as much as I don't want to do it that way)
this is without gtranslate
<p><a href="/es//" class="nturl">Spanish</a></p>
but same line when it is generated from gtranslate looks like this
<p><a href="es/" class="nturl">EspaƱol</a></p>
missing / in front of href in second case.
Ofc that is causing wrong urls to be generated after (/de/es/)
Re: Stop changing of urls
Apr 17, 2012 7:46 pm by Edvard
Apr 17, 2012 7:46 pm by Edvard
If you have <a href="/something">Read something</a> and after translation you don't want the language code to be added (<a href="/fr/something">Lisez quelque chose</a>), then you need to add class="nturl", so it will be <a href="/something" class="nturl">Lisez quelque chose</a> after translation. If you want the text also not to be translated, then you need to add also notranslate, so it will become <a href="/something" class="nturl notranslate">Read something</a> after translation.
On your site you should use absolute URLs for CSS, JavaScript and other assets. Otherwise you will need to use <base> to define the base path for relative URLs, so when you are on domain.com/fr/ the relative URLs will not be counted starting from /fr/...
Hope this makes sense. If you can provide your website URL and show how it is now and how you want it to be, I might be able to assist you better.
SIMILAR TOPICS
Changing Numbers and URL Links | Jun 19, 2018 4:05 pm | Replies: 1 | Post by: ryancomtek |
How to stop my subscription for gtranslate paidment option | Jun 17, 2018 7:24 am | Replies: 1 | Post by: hored |
Enterprise URLs not working | May 14, 2018 8:25 pm | Replies: 1 | Post by: dpitfield |
Gtranslate changing some numbers to text in calendar | Apr 13, 2018 4:38 pm | Replies: 1 | Post by: pazaz |
Stop sub domain redirection to main domain | Apr 12, 2016 7:45 pm | Replies: 3 | Post by: xperthere |