w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Multi-Domain, Multi-Client reCAPTCHA use
Before July 2014 (or so), it was possible to create a global key for reCAPTCHA through the reCaptcha admin page, as seen in the screenshot below. Unfortunately, this option is no longer available. Existing global keys still work, but it's no longer possible to create new global keys. Sorry. :(

Categories : PHP

Cassandra: what is the correct configuration for EC2 multi-region?
According to the docs: broadcast_address: (Default: listen_address) If your Cassandra cluster is deployed across multiple Amazon EC2 regions and you use the EC2MultiRegionSnitch, set the broadcast_address to public IP address of the node and the listen_address to the private IP. listen_address: (Default: localhost) The IP address or hostname that other Cassandra nodes use to connect to this node. If left unset, the hostname must resolve to the IP address of this node using/etc/hostname, /etc/hosts, or DNS. Do not specify 0.0.0.0. rpc_address: (Default: localhost) The listen address for client connections (Thrift remote procedure calls). seed_provider: (Default: org.apache.cassandra.locator.SimpleSeedProvider) A list of comma-delimited hosts (IP addresses) to use as contact points when

Categories : Amazon

Deployment to instances using JBoss 7.1 as domain controller
In the end I did two things: I am using jboss-web.xml to specify a context root, which is the same for all deployments (which is OK, because we have one deployment for each server group). I started a feature request for the runtime-name parameter which is missing the JBoss 7 Maven plugin: https://github.com/jbossas/jboss-as-maven-plugin/issues/52

Categories : Java

Redirect old multi-blog to new domain
I assume you are running the old website on an Apache server. Have you tried to put an .htaccess file in your old website DocumentRoot, with this directive: RedirectMatch permanent .* http://www.emcoutdoor.com/campaigns/ If you did, but this doesn't do anything (or worse generates an internal server error), check that the alias_module Apache module is loaded - eg on Linux you can get a list of loaded modules using the shell command: apachectl -t -D DUMP_MODULES

Categories : Htaccess

Multi-domain routing/redirecting
You can use $_SERVER['HTTP_REFERER'] From the doc: 'HTTP_REFERER' The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted

Categories : PHP

LocationManager region monitor is not what I expected. The region boundary looks bigger than my settings
My experience is that this is normal behavior. I've been using region monitoring for about 2.5 years now and since iOS 6, the -didExitRegion delegate takes much longer to trigger than the -didEnterRegion. I also had this behavior confirmed by an Apple Engineer during WWDC 2013. It doesn't sound as if they plan to improve the accuracy, rather delay, in the exit events. According to the engineer, the OS takes a lot longer to decipher that you've left because it has to completely get out of range of known Wifi networks and to new cell towers. It is much easier to determine you've arrived than it is to determine you've left. If it is only taking 300M or so to trigger your geofence (outside the 300M radius), I'd say you are probably within the operating limits of the geofence. If you need prec

Categories : IOS

How to disable a region when a child window pops up in another region in prism mef wpf
You can bind your viewModel's main content's attribute IsEnabled to a boolean property IsPopupGone. In the constructor of your toolbar subscribe EventAggregator to an event PopupWindowStateChanged and payload as a boolean. Then when your popup window(s) display, publish this event with True, and when closed publish as False. private bool isPopupGone = true; // default/original state assumed to be no childs showing public bool IsPopupGone { get { return isPopupGone; } set { isPopupGone = value; /* implement notifypropertychanged */ } } public ToolbarViewModel(IEventAggregator eventAggregator) { EventAggregator = eventAggregator; EventAggregator.GetEvent<PopupWindowStateChanged>().Subscribe(UpdateEnabledState); } public void UpdateEnabledState(bool isPopupShowing

Categories : Wpf

Magento multi websites not working properly when point to new add on domain
You need to change the URL setup in Magento. Configuration -> web -> frontend URL change this to newdomain.com/ (you will need to select the store from the store selection dropdown too). then refesh all Magento cache and indexes, and the links should now point to the correct URL.

Categories : PHP

HBase region over region servers load not balanced
Are you using sequential rowkeys, like timestamp?If that is the case you might end up with RegionServer Hotspotting, putting uneven load on the servers. Avoid using sequential keys, if you can. If it is not possible create pre-splitted tables.

Categories : Hadoop

Emacs: select a region and type to delete the region
I don't think it does it out of the box, it looks like you have to turn on delete-selection-mode as per this article on EmacsWiki. So, basically put the following line into your .emacs: (delete-selection-mode 1)

Categories : Emacs

how to use shared preference on multi textview,multi checkbox,multi button and multi edit box in android?
Use these method to save and get values from any where in your app change parameter according to your requirment this method to save value in shared prefrences public static void setPref(Context c, String pref, String val) { Editor e = PreferenceManager.getDefaultSharedPreferences(c).edit(); e.putString(pref, val); e.commit(); } this method to get value from shared prefrences public static String getPref(Context c, String pref, String val) { return PreferenceManager.getDefaultSharedPreferences(c).getString(pref, val); }

Categories : Android

Configuring or adapting Spree or another solution to create a multi-vendor, single domain marketplace (similar to etsy) in Ruby on Rails
If you haven't already, check out Jeff Dutil's work with Spree Marketplace and Spree Drop Ship. With a bit of work for stable releases and customization, they may be able to achieve what you're looking to do.

Categories : Ruby On Rails

Azure worker role deployment fails if I don't delete the previous deployment
I did more research and I think I may know what's going on. Apparently Visual Studio tries to upgrade your worker roles in place when you deploy. If that fails, for some reason such as you changing service configuration between deployments, it just complains that there's something wrong with your role and that your instance is recycling. In deployment options there is an option called 'If deployment can't be updated, do a full deployment' which will delete the existing deployment and deploy from scratch if the existing deployment can't be updated. I'm not sure why this isn't checked by default instead of 'fail mysteriously'.

Categories : Azure

How can I get the country and region code using geolocation instead of full country and region names
You should use the short_name value for the country, which is the two-digit country code. These are ISO standard codes and should be the basis for your database lookup, not the localized country name.

Categories : Javascript

.htaccess domain directory does not resolve domain.com/domain properly
Replace your code with this code: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{DOCUMENT_ROOT}/$1 !-f RewriteCond %{DOCUMENT_ROOT}/$1 !-d RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s/+bar[?/s] [NC] RewriteRule ^(.*)$ - [L,R=404] RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^bar(/.*|)$ /bar/bar$1 [L] RewriteCond %{HTTP_HOST} ^(www.)?bar.com$ [NC] RewriteCond %{ENV:REDIRECT_STATUS} !200 RewriteRule ^(.*)$ /bar/$1 [L]

Categories : Apache

Multi Client Server, Multi interface, Multi IP version Socket
You're not missing anything. It is accepting connections to ::1 you said? Then it will accept ipv6 connections. And since IPv6 is backwards compatible, if you've created the correct ipv6 socket, it should be able to send and receive ipv4 packets as well.

Categories : C

convert java domain model from domain A to domain B
You may want to look at DOZER. The lib will allow wildcard transformation of fields (if they share the same name) and also permit custom converter.

Categories : Java

Pointing domain at seperate sub-domain & domain
This comes down to the provider's definition of "web forwarding", which is a vague marketing term. It sounds like they're just doing a straight redirection unfortunately, which no amount of playing with .htaccess files can fix: you simply cannot make a website tell the browser to stick another domain name in its address bar. What I'd suggest is talking to them and see if they can do a CNAME for www.domain1.com to subdomain.domain2.com, or switch to it using the same IP address instead. You will then need to set up your Wordpress install to respond to "www.domain1.com" requests.

Categories : Wordpress

Domain driven design: overriding virtual methods in Domain classes
Person.UpdateAddress should definitely be in your domain, not in your Repository. UpdateAddress is logic and you should try to avoid logic inside your repository. If you're working with Entity framework there is no need for 'data classes'.

Categories : Entity Framework

How to display sub domain posts in main domain home page on wordpress?
Try adding this to an appropriate place in your .htaccess file located in Root folder of your site : RewriteEngine On RewriteCond %{HTTP_HOST} ^(.+).domain.com$ [NC] RewriteRule ^ http://domain.com/ [L,R] To exclude www subdomain , www.domain.com, add this line before the RewriteRule: RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]

Categories : PHP

Cross domain error even when ajax called made from same domain
Have you tried setting alternate HTTP header values when your service returns data: Access-Control-Allow-Origin:* Access-Control-Allow-Headers:"Content-Type, X-Requested-With, X-Auth-Token" This worked for us when trying to make REST calls to services under different sub-domains. You don't have to make Access-Control-Allow-Origin: * you can probably be more restrictive. But we tried this just to check if it will work. Just to clarify - we still use json and not jsonp

Categories : Jquery

Redirect all traffic to from external domain to local domain homepage?
See this answer You must use modrewrite of apache: RewriteEngine On RewriteCond %{HTTP_REFERER} !^mydomain.co.uk$ [N]

Categories : Apache

Weird thing going on with domain. if Entered without www.domain.com, goes to wrong host
Contact your old nameserver provider and tell him to remove the domain from his parkings OR create an index.html on your old host like this: <meta http-equiv="Refresh" content="0; url=http://www.zipdaturl.com/">

Categories : PHP

.htaccess rule for domain.com to www.domain.com/index.php OR domain.com/index.php to www.domain.com/index.php
RewriteEngine on RewriteCond %{HTTP_HOST} !^www.domain.com RewriteCond %{HTTP_HOST} !^domain.com RewriteRule ^$ /index.php [QSA,L] RewriteRule ^file.php /file.php [L]

Categories : Htaccess

How to Test ASP Application on Domain when Development Environment isn't on Domain?
We did few large deployments of AD with asp.net applications with automatic account provisioning and 50k+ users and the idea was always to abstract the user backstore and have at least two or three implementations: inmemory repository injected into upper layer services for unit testing them database implementation convenient for developers as it is persistent, doesn't vanish on restarts actual ad implementation tested separately in two different testing environments but not directly by developers (devs use the database repository) Having the logic which relies on abstraction and is conveniently tested with the inmemory repository and then having the ad repository tested separately allows us to just compose these two on the production site.

Categories : Asp Net

Powershell - Remove Domain.com/OU/ from Domain.com/OU/GivenName Surname
You can use the Split-Path cmdlet to get the name only: Split-Path 'Domain.com/OU/GivenName Surname' -Leaf I would also try to get the name by checking if Identity has a Name property: $obj.Identity.Name

Categories : Powershell

Redirect any sub-domain to main domain by editing DNS Record
The CNAME is what you're looking for, although there is another alternative, you can create a .htaccess file that you'd put in the root of the subdomain containing : Redirect 301 / http://www.domain.com I don't know how this can work on IIS, I highly doubt it supports .htaccess files, but my guess is that you can do this with ISAPI filters.

Categories : Asp Net

Node.js - Domain per Express request, inside another domain
Ok, solved - Express has a try/catch block, which is getting to my non-existent function call first. To have the domain catch it, it needs to be taken out of the current call stack, like... process.nextTick(function() { this_function_does_not_exist(); res.end('we will never get here'); }); THEN the domain will grab it.

Categories : Javascript

Ajax Cross domain request to non-controlled domain
See Ways to circumvent the same-origin policy. None of them will meet your requirements. Preventing Mallory's site from using Alice's site with Bob's credentials (such as his IP address) is the point of the Same Origin Policy. There is no way around this for a web application. Since it's an internal application If it is an internal application, then you could look at using a browser extension to access the data. They have less restrictive security policies as they have to be explicitly installed.

Categories : Javascript

Redirect sub domain to another sub domain with the same sub folder structure
Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^games.domain.com$ [NC] RewriteRule ^(data(?:/.*|))$ http://games.domain.net/$1 [L,R=301,NC]

Categories : Htaccess

.htaccess poiting a domain to another domain/directory
Insert this code just below RewriteBase line: RewriteCond %{HTTP_HOST} ^(www.)?one-domain.com$ [NC] RewriteRule ^$ http://www.second-domain.com/abc [L,R=301] Also note that this block is repeating multiple times: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> You need to have this block only once in your .htaccess

Categories : Apache

yii user is logged in on domain.com/x but isGuest on domain.com/y
Enable cookie-based authentication in your config: 'user' => array( 'allowAutoLogin' => true, ), Than configure your session component: 'session' => array( 'savePath' => '/some/writeable/path', 'cookieMode' => 'allow', 'cookieParams' => array( 'path' => '/', 'domain' => '.yourdomain.com', 'httpOnly' => true, ), ), Make sure that /some/writeable/path is really writable! Finally, and this is the crucial bit with Yii (the above cookie configuration is generic PHP), the Yii application ID must be set in the config file: 'id' => 'yourdomain', That's it!

Categories : PHP

Typo3 redirect domain with prefix to another domain
RewriteEngine On RewriteCond %{HTTP_HOST} ^bli.bla.com$ [NC] RewriteRule ^(.*)$ http://bla.bli.com/$1 [R=301,L] or RewriteCond %{HTTP_HOST} ^www1.bla.com$ RewriteRule (.*)$ http://www5.bla.com/$1 [R=301,L] This example works 100% if implementet right. (TYPO3 .htaccess: "# Add your own rules here.") Maybe you should delete Cooluri or Realurl Cached links.

Categories : Htaccess

Get file contents of a domain in another domain in the same server
Glob needs file-access. But since it is on another domain. It doesn't get file-access (and it shouldn't). Even if they are on the same server, they shouldn't be able to access each others files for so many reasons. What you can do is write a small API on domain1.com that returns a list of images for a certain user. You then access that information using for isntance curl on domain1.com where the pictures are stored: <?php //get the user id from the request $user_id = $_GET['user_id']; $pathToImageFolder = 'path_to_pictures' . $user_id ; $images = glob($pathToImageFolder.'/*.{jpg,jpeg,png,gif}', GLOB_BRACE); //return a JSON array of images print json_encode($images,true); #the true forces it to be an array on domain2.com: <?php //retrieve the pictures $picturesJSON = file_get_

Categories : PHP

Why does my website automaticly redirects to domain.com instead of www.domain.com
That is done by wordpress not .htaccess Go to your wordpress DB and look for the table wp_options. Within it would be an option called siteurl & home change those to http://www.domain.com Now you will be redirected as you wish Hope it helps

Categories : Wordpress

How to redirect domain:port to domain with Glassfish?
The best way is to place Glassfish behind Apache http server and configure apache to point requests to glassfish. Therefore http requests are handled by Apache and all www.example.com requests are pointed to www.example.com:12544 internally. Below is a brief explanation of how to do this. Install Glassfish 3+ (make sure your listener is created and activated on 8009 and your jk is enabled) Install Apache (2.2+) get the mod_jk connector and place it into apache modules folder to do the configurations. create a worker.properties file and place it into apache conf folder. It should contain the following properties: worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 Open httpd.conf file in apache conf folder and place t

Categories : Eclipse

Yii:: redirect www.domain.com/index.php to www.domain.com without using htaccess
I guess no solution without .htaccess file , so build one Set main.php in your yii configuration, at component : 'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'caseSensitive'=>false, ), LoadModule rewrite_module modules/mod_rewrite.so to be LoadModule rewrite_module modules/mod_rewrite.so then go to .htaccess file, and try to modify to be: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)?*$ index.php/$1 [L,QSA] if above does not work try with this: RewriteEngine on # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule . index.php move

Categories : PHP

Google Tracking between a domain and a subdomain on a different domain
By default, Google Analytics creates a new visitor ID for each domain (or subdomain). What you want to do is "tell" Google Analytics to keep the same visitor ID when a visitor goes from one domain to another, e.g. from example.com to example.another-domain.com The "Multiple Domains and Sub-Domains" scenario is the one to follow. https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#multipleDomains

Categories : Google Analytics

add product from one domain, to the cart of different domain(both are on same server)
The requirement is that both domains have to store the sessions at the same place. Then you have to make the client use the same session id on both domains, to do that, pass the session id in all links and redirects that go from one domain to another. <a href="http://xyz.com/cart.php?<?php echo SID ?>">cart</a>

Categories : PHP

Point a domain to a URI of an IIS 7 website without changing the domain
In your question, you state that main.mydomain.com and hub.mydomain.com are binded to a single website. So if you want the users who hit hub.mydomain.com to be shown with the content from http://main.mydomain.com/hub/home.html, it is equivalent to have them hit hub.mydomain.com and be shwon the content from http://hub.mydomain.com/hub/home.html. You rule would then go as: <rule name="hub rewrite"> <match url="^/?$" /> <conditions> <add input="{HTTP_HOST}" pattern="^hub.mydomain.com$" /> </conditions> <action type="Rewrite" url="hub/home.html" /> </rule>

Categories : Iis



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.