I have a local web server for customers to order merchandises in my shop using their smart phone. The machine serving the local web also functions as a router and I have its local domain set as "start.order". When the customers type in http://start.order then it works fine. But without the http:// part the browser will go to the default search engine, be it Google or Bing, trying to do a search on "start order."
If the browser is Google Chrome then by adding a trailing "/" it also works fine, say start.order/. But on some unbranded browsers that come with the phones this trick won't work.
Question: Is there a universal way to tell the browser that a string is a URL rather than a search term without requiring prefixing the http:// part?
Yes. Use a real, actual, registered domain name instead of something you made up yourself.
Related
So, I am trying to implement a SharePoint intranet site for an organization. However, there is one application in particular that they would like a link to on the homepage. Unfortunately this application can only be used via the IE tab google chrome extension (I know, dumb) but app devs have yet to add chromium compatibility.
Any way the link looks like this:
chrome-extension:
//hehijbfgiekmjfkfjpbkbammjbdenadd/nhc.htm#url=https://website.com/sub/sub.Hub.aspx
But share point requires a https:// on the beginning of a link.
If you throw that destination into chrome directly it navigates fine, but if you add say https://google.com/ on the front or https://*/ it doesn't work.
Is there a syntax that will allow me to put https:// on the front of this without getting a 404 error?
Never mind, I ended up re-directing this through IIS internally
There has been a question made towards me recently to do the following:
We have a website with Drupal running in IIS.
On that site is an URL Redirect to a website hosted externally, obviously with a name completely irrelevant to the name of our company.
The question now is the following;
They want to change to URL to a subdomain of our website. Example: from "www.external-site.com" to "www.sub.internal.com" (while still showing content of the external website)
They want the current page of that website to be reflected in the URL bar. So it wouldn't say "www.sub.internal.com", but it would say "www.sub.internal.com/solutions/page1.html" (instead of "www.external-site.com/solutions/page1.html")
It's possible that I forgot another 'condition' but have mentioned before this.
So, if someone visits through our URL Redirect to External-website, it needs to show our subdomain instead of their domain in the URL, AND it needs to show the current page when people start browsing while still using our subdomain in the URL.
Now, I checked the external-website, and it seems that most of the links available are relative links (if this would be any useful information).
Currently, the external website is hosted externally, and will remain to be so for next few years. (I believe we bought the company)
I have been asking around and looking up, and the best possible thing seems to use domain forwarding, but even then it still doesn't seem to comply with the entirety that they asked of me.
I am but a 'simple' .NET programmer, held responsible to do support for anything involving the websites, and I can't say I have extended knowledge about infrastructure. (But I can ask people to do this for me)
Is there anything that could solve this?
Thanks so much!
IIS's URL rewite and Application Request Routing (ARR) combo can help you what you want to achive. Here are few links which may guide you to configure ARR. Please note that these links dont exibit exact solution to your problem however you can take clue from it and fabricate your solution accordingly.
http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing
http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-rule-template
It sounds like you'll want to use a full-page iframe: do not redirect but show a page with an "inner page" instead: that inner page is the external web site. That way, users do not see the external site in their URL bar.
http://webdesign.about.com/od/iframes/a/aaiframe.htm
You need to configure the equivalent of Apache Virtual Host with Reverse Proxy on IIS.
See this answers:
https://serverfault.com/a/271030
and
https://stackoverflow.com/a/10003306/2131693
I've searched around on SO, and found a few questions that ask about this, but most of the answers that I've come across all seem to suggest either filtering via IP range or introducing conditional code to the engine powering the site; neither of these options are viable for me. If this does turn out to be a duplicate where this an answer that fits in to my use case, then I apologize in advance, but I just can't seem to find anything.
My original method of filtering myself out from Google Analytics was to simply redirect requests to google-analytics.com and the https version of GA to localhost in my hosts file. This works just fine on my desktop, but it is useless when testing on mobile devices like an iPhone (unless somebody knows how to finagle the iPhone's hosts file without jailbreaking).
My setup for local testing is to use pow with .dev domains for the local project directories, and then when I need to see the development version of sites on mobile devices I use Xip.io in conjunction with Adobe Shadow.
I can't filter by IP range because I frequently work from home, and my ISP doesn't provide static addresses for residential accounts.
I tried to set up a Custom exclude filter in my Google Analytics profile to filter out traffic originating from these domains, but they either don't work or I have a really bad misunderstanding of how the Exclude filters work (which is entirely possible). I have Custom Filters set up to Exclude based on the Hostname, matching the patterns \.dev and .*xip\.io/.* but these filters do absolutely nothing. I believe this is because this filter is, technically, looking for the hostname of the originating domain and not the hostname being requested, but I'm really not sure because the language is vague and differs depending on which help document you're looking at.
Short of manually removing the GA tracking codes from the site during local dev then going back and adding them back in, does anybody have any suggestions or can anybody tell me what I'm doing wrong with my Exclude filters?
I've been using a variation on the analytics tracking code to prevent page views from being tracked on our staging server -- something like:
if (!/\.dev|xip\.io/.test(window.location.hostname)) _gaq.push(['_trackPageview']);
Alternatively, you could apply this to the _setAccount call. If you do this and look at the tracking requests, the web property ID shows up as 'UA-XXXXX-X'
You could rely on
window['ga-disable-UA-XXXXXX-Y'] = true;
where UA-XXXXXX-Y is the account ID. (details here).
Like creating a page or webserver directive that sets a cookie (page reserved to developers to be excluded from ga), and in your code that loads ga:
if (hasDeveloperCookie()) {
window['ga-disable-UA-XXXXXX-Y'] = true;
}
Im configuring a desktop and mobile version of my site and was looking to use js to test for browser dimensions and then load the relevant version, however the problem is if someone shares a link from the mobile version and sends it to a desktop user then they circumvented the check. Is there a way to configure .htaccess (or some other method) to have the address bar show 'mysite.com' even though i would be loading 'mysite.com/mobile.htm'? I know i can always use media queries but that has the downfall of loading unused assets, so this method would be alot better.
Use a rewrite instead of a redirect. With a redirect, the browser is instructed to go to another address. With a URL rewrite, the server just responds with the contents of a different URL.
For just this page it will be simple, but it could be complicated, based on your site.
Another way is to include a little JS in every page to make sure you are on the right one for the device and redirect to the other if not. It would help if there was some pattern to easily determine the corresponding page.
for local development I'm running a local webserver with virtual hosts to manage multiple webprojects requiring their own URL. Normally I use URLs like myproject.com.local and the real project will be located at myproject.com. Everything works fine in Safari, IE or Firefox. But Google Chrome throws a 404. As far as I know they have some kind of intelligent address bar. Is there any possibility to get it working with all domains?
Best Regards,
Bernd
I think it should be working with all domains, as long as your workstations DNS can resolve the name to an ip-address. Also, check if you have any proxy settings in Chrome, sometimes it helps to check the 'Bypass proxy for local domains'-checkbox (somewhere in the settings).
Also make sure that when you request non-standard domains or port-numbers to put http:// in front of your url.
Good luck.