baseurl

How to set different baseUrl path in jQuery ajax requests in development and production mode?

My baseUrl path for jQuery ajax requests is different in development and production mode. How can I set it in some kind of config.ini file to switch it easily. Rightnow I'm using a baseurl.js file containing just baseurl path. In production mode, I change this variable via shell script. What should be better approach? edit To make th...

Setting baseurl in cakephp

Hi, I am working on an appliication which is running in cakephp and i am using ajax query inbetween. In all the cases for all the ajax post i have used the url as var ht = $.ajax({ type: "GET", url: "http://172.20.52.99/FormBuilder/index.php/forms/viewChoices/"+attribute_id, ...

hyperlink starting slash?

In my php script I created a constant variable that defines the base url to be put in my hyperlinks, but do I really need this? Here is an example of what I mean. I have this: // base url is only defined once and reused throughout define("__BASE_URL","http://localhost/test1/"); print '<a href="'.__BASE_URL.'index.php?var1=open/>Ope...

Zend View Helper strange issue

Hello everyone, I have been working on a zend framework project on localhost (OS: Snow Leopard) and when I uploaded the files on the hosting server (shared hosting) I got some errors about a view helper i was using there. More specifically: The project structure is like this: ( i ommited some irrelevant subfolders and the numbers in th...

zend framework how to avoid baseurl getting prepend to the link.

Greetings, links redirecting to other website not working.... Am trying to display member's website as a link, which is retrieved from database, as link, when clicked should redirect or go to that website. But members website url is getting appended to the end of the site base url as shown below . [a] href="www.mysite.com/member/deta...

jQuery ajax url problem

Ok a have an script for submiting input data. There is an url of my site going like this : http://www.&lt;!mywebsite!&gt;.com. This ajax request works perfectly when user is viewing my iste on http://www.&lt;!mywebsite!&gt;.com, but when he visits my site without www. e.g. http://&lt;!mywebsite!&gt;.com than the request doesn't works. I ...