w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Using facebook connect on multiple domains/subdomains
It is technically possible to use Facebook Connect on multiple domains, there are some limits (5 domains max). So the key to doing this is adding all domains in the App Domain field under your app settings. The PROBLEM, however, is that Facebook only lets you add domains that are derived from your Canvas URL or Site or Page tag URLs, so if you try to enter anything else you get an error that looks like this: The SOLUTION is to create App on Facebook, Website, and Facebook Tab using the ADD PLATFORM button and then put in URLs that point to your other domains. Here is an example of what I mean: If you use a unique domain for each field you can max out with 5 different domains. I have tested this technique with up to 3 domains, but i think it should work for all 5. Note: Faceboo

Categories : Facebook

.htaccess subfoders, subdomains and addon domains
In the main site's .htaccess: RewriteCond %{HTTP_HOST} RewriteCond %{HTTP_HOST} www.foo.com RewriteCond %{REQUEST_FILENAME} ^bar RewriteRule ^bar/(.*)$ http://www.bar.com/$1 [R=301,L,QSA] RewriteCond %{HTTP_HOST} www.foo.com RewriteCond %{REQUEST_FILENAME} ^sub RewriteRule ^sub/(.*)$ http://sub.foo.com/$1 [R=301,L,QSA] The other 2 sites, being hosted from subdirectories should not ever have a need for trying to map away from something like bar.com/bar/... with this setup. In the bar.com site you can do this: RewriteBase / RewriteCond %{REQUEST_FILENAME} ^bar/(.*)$ RewriteRule .* %1 [R=301,L,QSA] RewriteRule ^bar/?$ / [R=301,L,QSA] RewriteCond %{HTTP_HOST} www.bar.com RewriteCond %{REQUEST_FILENAME} ^sub RewriteRule ^sub/(.*)$ http://sub.foo.com/$1 [R=301,L,QSA] For sub.foo.com

Categories : Apache

System Architecture : How to Use the same Banner ( like google banner ) in multiple different websites hosted in different domains or subdomains )
You really have two separate questions here. First, how to include a bit of HTML in multiple projects. There's really a myriad of possibilities here. If all of your sites are in the same solution in Visual Studio, the easiest method is to simply pick one project to hold the partial view for the banner and then link to it in your other projects. You do this by right-clicking somewhere in your project in the Solution Explorer and choosing Add -> Existing Item..., find the file in the other solution, but instead of "Add" to confirm, click the arrow next to it, to expand the dropdown and choose "Add As Link". Alternately, or if one or more of your sites is not in the same solution or is in another language altogether, then your best bet is probably just to save the snippet of HTML as a flat f

Categories : Asp Net Mvc

Using AWS services to create subdomains on the fly to host a site on S3
I researched a similar scenario some time ago but I was unable to use S3 for this because of a S3 limitation. To host a static website on S3 on a custom domain or subdomain, you need to create a bucket with a name that matches that domain. And because each S3 account is limited to 100 buckets, you will only be able to host those many domains or subdomains on a single account. Based on the use case you described, I suspect this S3 limitation will also force you to find another solution. In my case, the solution was to set up an EC2 instance that proxies requests to S3 after rewriting them. For example if someone requests: http://mysite.abc.com/file.html that goes through our EC2 server where the request is rewritten and forwarded to S3 as something like: http://ourbucket.s3.amazonaw

Categories : PHP

Codeigniter: One site, two domains
In DB config file write a condition like this if(strpos($your_current_url, 'domain1') !== FALSE) : /* * DB CONFIG FOR DOMAIN1 */ elseif(strpos($your_current_url, 'domain2') !== FALSE) : /* * DB CONFIG FOR DOMAIN2 */ endif;

Categories : PHP

robots.txt file for different domains of same site
The process is reasonably simple: The controller/action approach Using your routes table, map your robots.txt path to an action in a controller (I use controller and action as a simple example to get you started), just as you would any other controller and view for a given path. Inside the Action, check the domain in the request and choose your robots.txt content for that domain. Return the appropriate file from disk using something like: ContentResult and setting the ContentType to "text/plain" FilePathResult if your robots files are just files on disk, through one of the helper methods on the Controller class such as File(name, "text/plain") The following sample assumes a single top level robots.txt file: // In App_Start/RouteConfig: public static void RegisterRoutes(RouteCollect

Categories : Asp Net Mvc

.htaccess redirrect to mobile site for multiple domains
Change the example.com to use %{HTTP_HOST}: RewriteCond %{REQUEST_URI} ^/$ RewriteCond %{HTTP_USER_AGENT} "android|blackberry|googlebot mobile|iemobile|iphone|ipod|opera mobile|palmos|webos" [NC] RewriteCond %{HTTP_COOKIE} !is_splash_visited=1 [NC] RewriteRule ^(.*)$ https://%{HTTP_HOST}/mobile/$1 [R,L]

Categories : Apache

Multiple SSL domains to one Azure Cloud Service Site
Just in case someone else needs help on this, there were two problems: The SSL cert I was using wasn't chained correctly. If you get 3 certs from your provider, you need to install them correctly using the IIS and MMC. See here for more info. The SNI article did work. The problem for us was the binding order. We ended up the following order: As you can see we had to play around to get this to work but the following bindings meant that both domains would point to the same web application. You will notice that we have added in my.ourapp.com twice - one with SNI enabled and an IP address and the other without. SNI does not work with IE on Windows XP - we added the last option as a default, non-SNI binding so our main domain would always work, even on IE & XP. Hope that helps someo

Categories : Ssl

Multiple site domains and virtual directory single login
What you are describing is a 'classic' SSO (single sign-on) example. There are lots of ways people have tried this and they are well documented on Google. One way to do this is to have your SSO server (e.g. the first place you land and log in) to issue a security 'token' (e.g. a Guid) and then either store this in a cookie or append to URLs. Each subsequent call to an application can look-up the token in a database, verify it's validity and carry on (or boot the user out if invalid). Using a database also allows you to set a timeout for all applications for which the token is valid. This can then be extended to allow the database to store which apps each user can access etc. I've described this in very broad terms but it may be a good starting point. Hope this helps BTW: querying the

Categories : Asp Net

Subdomain Points to Subfolder and need .Htaccess to Redirect to a Wordpress Multi-Site Sub-Site
Well, depending on your provider, you can point your subdomain towards the same directory of your top level domain, i.e.: example.com -> /public_html/ this.example.com -> /public_html/ But your question is not clear about what you are trying to do. Is it a subdomains network or is it a subfolders network? If subdomains, try to change the directory your subdomain points to as in the example above, and create the blog inside wp-admin/network/ If subfolders, then you don't need the subdomain, unless you really want to redirect it to a subfolder just like an easier to remember shortcut, in that case you don't need a RewriteRule, WP takes care of the virtual subfolder.

Categories : Wordpress

Recreate part of a forms functionality across domains or autofill a single field on another site
I got everything but the submit button working with this: <div class="html_content" align="center"> <html lang="en-US"> <head> <meta charset="UTF-8" /> <link rel="profile" href="http://gmpg.org/xfn/11" /> <link rel="pingback" href="http://supportsps.org/xmlrpc.php" /> <link rel="alternate" type="application/rss+xml" title="supportsps.org &raquo; Feed" href="http://supportsps.org/feed/" /> <link rel="alternate" type="application/rss+xml" title="supportsps.org &raquo; Comments Feed" href="http://supportsps.org/comments/feed/" /> <link rel='stylesheet' id='contact-form-7-css' href='http://supportsps.org/wp- content/plugins/contact-form-7/styles.css?ver=2.4.3' type='text/css' media='all' /> <script type='text/javascript'

Categories : Javascript

Same user login on Different wordpress domains with different databases
You can try and setup the wordpress network solution to achieve this. http://codex.wordpress.org/Create_A_Network alternatively there is a third party method if this does not achieve what you want. https://managewp.com/ there is a premium plugin by wpmu that can do this as well http://premium.wpmudev.org/project/wordpress-user-synchronization/

Categories : PHP

Drupal 7 - Hosting New/Multiple Domains Seamlessly With Same Site Code, Themes, Modules, Data etc
It seems that you read an old documentation for multisites on (2). For Drupal 7 check https://drupal.org/documentation/install/multi-site. But you need to set up Symlinks (Symbolic links) to achieve that. I don't think you need a multisite here if both sites use the same files and database.

Categories : Drupal

Difference in appearance between alias domains of a WordPress website
Your problem is that you linked to the font's css file with an absolute path but the css file itself contains relative paths. So the browser will try to pull the files from a different domain name than the current alias. Some browsers try to avoid cross-server vulnerabilities by not allowing this in certain situations. Change the absolute path to a relative path and your problem will go away. Change this: <link rel='stylesheet' id='customfont-css' href='http://SeaChangeSalt.com/wp-content/themes/zenon/fonts/yanone_kaffeesatz.css?ver=3.5.1' type='text/css' media='all' /> To this: <link rel='stylesheet' id='customfont-css' href='wp-content/themes/zenon/fonts/yanone_kaffeesatz.css?ver=3.5.1' type='text/css' media='all' /> So looking at the theme you are using for Wordpr

Categories : HTML

How to use a single search box for multiple domains or websites in wordpress
Am I right : your two websites have two distinct databases ? Therefore there is no simple way to search in the two sites at once. You could do it like this : Create separate tables, containing a copy of the data of the two sites. Have a cron job keeping these tables up to date. Connect your search box to these tables. Modify the display of the result in order to link to the correct site of both.

Categories : Wordpress

Can a single hosts file entry contain multiple domains/sub-domains?
I found the solution. On IIS, I had to add https in bindings associating it to use IIS Development Certificate for SSL in my development environment. Also, in the process I found that both of the following wiil work for me. 127.0.0.1 somedomain.com, alternate-domain.com, subdomain.domain.com or 127.0.0.1 somedomain.com alternate-domain.com subdomain.domain.com Spaces and commas both work, and I can add multiple domains, subdomains combinations on same line. Also, if you are moving from a non-secure domain to secure domain/subdomain, SSL certificate needs to be setup on web server for it, else it would end up showing an error in the browser. Cheers!

Categories : Asp Net

mod rewrite: handling sub domains, top level domains and query string
You just need one rule as QUERY_STRING is automatically copied over to after redirect. RewriteCond %{HTTP_HOST} !^example.org$ [NC] RewriteRule ^ http://example.org%{REQUEST_URI} [R=301,L]

Categories : Htaccess

SSL on only one page of Wordpress site
In your Wordpress WP-Admin settings, you will have set the URL for the website, which Wordpress will use for handling all URLs (including links to CSS, JS, etc files). Is there any reason you can't run your entire Wordpress website on SSL? It's a much cleaner solution then jumping in and out of SSL for specific pages of your site.

Categories : Wordpress

url Canonicalization for wordpress site
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} !^www. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] </IfModule> Try this. And get rid of the top line Redirect 301 / http://www.drwagenberg.com/

Categories : Wordpress

Optimising a big Wordpress site
With issues like this, the thing to do is take the caching out of the hands of Wordpress, and make the server to the work. Software like Wordpress and Drupal do have their own caching systems, and you should enable them, but even with them in use, there's still a certain amount of overhead for the software to load and serve the page. So I suggest you investigate a server caching engine such as Varnish. This will dramatically reduce the server load for most sites like yours; if you have a lot of requests for the same page over and over, Varnish will take over the caching and Wordpess will never even have to know that the page is being requested. No more loading PHP and the Wordpress core for every request, no more database session with every request. If your back-end CMS software is sta

Categories : PHP

php check mysql wordpress site
There is no reason to use raw SQL for this. Actually, there is already a function in Wordpress that will do exactly this: get_page_by_title(). Simply pass the title as a string argument into the function and it will return the post object for the matching post. If multiple post share the same title it will simply return an array of posts.

Categories : PHP

How to copy a WordPress site to a different domain
You need to update your siteurl value in the wp_options table. See this answer for a more complete explanation.

Categories : HTML

Need to move logo on site using WordPress
You need to remove margin-top: 30px from open-hours. Or alternatively add the same margin for your logo. This was easy to see using Chrome developer tools. If you are unfamiliar, in Chrome try view > developer > developer tools. Then in the bottom left corner, click on the magnifying glass icon. Then you can click on the opening hours and on the logo and see from "computed style" on the right that their upper margins are different.

Categories : PHP

jQuery not working on Wordpress site
Try this in your functions.php file, function load_jQuery() { // load external file wp_register_script('jquery', ("http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"), false); wp_enqueue_script('jquery'); wp_register_script('search', get_template_directory_uri() . '/_/js/search.js', array('jquery') ); wp_enqueue_script('search'); } add_action('wp_enqueue_scripts', 'load_jQuery'); Source from Wordpress wp_enqueue_script Not Working

Categories : Javascript

Can't access the backend of my wordpress site
did you try clearing your cache and cookies? is this a shared hosting or dedicated hosting? If you get these errors with a fresh install, default theme and no plugins, on a shared hosting, I'd ask the hosting company because it is not normal ...

Categories : Wordpress

Wordpress Site Will Not Index In Google
It could be that your sitemap is empty so you're giving him nothing to crawl ? http://www.barre101.com/sitemapindex.xml Although if you have links from external sites, you will get indexed right away ... Do check your sitemap though, and correct that and then add it to sitemaps in webmaster tools. Wordpress is really fast to index, really!

Categories : Wordpress

Chromecast Receiver URL on Wordpress Site?
Please check if the answer in this question (Chrome-cast Sample App doesn't work) can solve your problem. Basically you need to set AppID in your receiver.html as well.

Categories : Android

File Path in Wordpress Site
Ok, with a little help I go to this result: Select Date <?php $sub = ($_GET['dir']); $path = 'groundfish-meetings/'; $path = $path . "$sub"; $dh = opendir($path); $i=1; while (($file = readdir($dh)) !== false) { if($file != "." && $file != "..") { if (substr($file, -4, -3) =="."){ echo "$i. <option value='" . home_url('/groundfish-meetings/' . $file) . "'>$file</option>"; } $i++; } } closedir($dh); ?> </select> Does anyone know how I would sort them by date, most recent to oldest?

Categories : PHP

How to integrate a wordpress site with Joomla 3.0
1st thing I want to mention here is having two separate cmss' in a directory is a bad idea. If had searched a bit on google you would find this helpful. JConverter As the name suggests, JConverter allows you to convert your WordPress blog into a Joomla site. It can import users, blog posts, categories, pages and even links from your WordPress blog to Joomla. If you are not sure about the quality you can start reading the comments. Advice have a separate folder for two cmss and use a .htacess file to get the job done. You can find tons of articles explaining how it should be done.

Categories : PHP

ie8 ignoring styles on WordPress site
You seem to have some HTML issues that IE8 isn't handling quite as gracefully as the other browsers. Some of the worst offenses are apostrophes in HTML attributes, which prematurely end the attribute. W3C validator results

Categories : CSS

wordpress site is only displaying 5 posts
You see 5 post because it's default value in your wordpress admin. It's not 100% right way, but you can do the same by using this construction: <?php $myposts = get_posts('cat=1&numberposts=-1&'); foreach($myposts as $post) : ?> <?php the_time(__('d/m/Y')) ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?> <?php endforeach; ?> Where "cat" - category name/ID. Also you can try to remove "cat=" if you need all categories.

Categories : Wordpress

Wordpress Site RSS Feed link
You are closing </div> inside your <a> element. You might want something like this: <div id="rss_link" style="margin-left:35%; margin-right:20%; width:10em;"> <a href="http://therearenoroads.com/feed"> <img style="width:90px; height:90px;" src="http://blog.sironaconsulting.com/.a/6a00d8341c761a53ef0120a7abc384970b-120wi" alt="RSS Link" /> <p style="font-size:1.3em; text-align:center;">Feed of TANR Knowledge</p> </a> </div> Additionally, this also happens in chrome when you click on most rss feeds, since it doesn't have a rss subscribe widget in it. In firefox, the feed is handled much more smoothly.

Categories : Wordpress

displaying wordpress post on another site
You don't need to connect directly to the blog database. You can simply create a new file in your Wordpress directory and include the wp-blog-header.php file: Example: <?php require('./wordpress/wp-blog-header.php'); // change this to fit your path ?> <p>Recent Posts:</p> <ul> while (have_posts()) : the_post(); ?> <li><?php the_title(); ?> </li> <?php endwhile; ?> </ul> Hope that helps!

Categories : PHP

Launch Wordpress Site from index
You could use the following in your .htaccess (Below the Wordpress definitions) DirectoryIndex index.html Index.html is your page and index.php is that of Wordpress. But Wordpress uses the domain-name without index.php for it's home page so you keep getting thrown into your index.html (logon page). You would need to automatically redirect to index.php if a cookie is set (or something). Better would be installing Wordpress in a subdirectory if you really want an enter page like this. Then you could have /index.html redirected to /WP/index.php. Check this article (and its links) for developing Wordpress in a subdirectory.

Categories : PHP

Wordpress add html to Site Title
If you're going to try to directly insert that into the header.php file instead of using the proper wp_enqueue_script() method, then three things need to take place. 1) - You need to make sure this is called after wp_head() 2) - If you're trying to insert html into the document, then you need to use .html() 3) - There may be some conflict, so you should use the no conflict ready handler jQuery(function($){ $("h1#site-title a").html("name<b>surname</b>"); });

Categories : Jquery

Moving Wordpress site to new server same URL
Use phpmyadmin on the new host to check the table prefixes of the imported database. The "new install" issue means wp-config.php isn't reading the correct database tables. Or, open the database dump and check the database table prefix. And, of course, be sure your database name, user and password are all correct in the new wp-config.php. If you are not changing the domain, there is no need to change URLs in the database. If you do change domains, use http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ to correctly change URLs in plain and serialized data.

Categories : Mysql

Display Wordpress Site Title
You are not outputting anything to show. You are only assigning blog name to a variable. You need to echo the content. It should be : <h1><?php echo get_bloginfo( 'name' ); ?></h1> Hope this helps :)

Categories : PHP

In Wordpress, Getting The Site URL Inside a Stylesheet
Have you tried removing the slash in front <style> @media (max-width: 420px){ .home-background { background-image: url('images/home_page/bg-mobile.jpg'); } } </style>

Categories : Javascript

Show Posts from Another WordPress Site
Easiest thing to do is use RSS. See FeedWordPress | simple and flexible Atom/RSS syndication for WordPress and Developer's Guide - Google AJAX Feed API - Google Code and Magpie RSS - PHP RSS Parser for different ways to implement RSS feeds as links or import posts themselves.

Categories : PHP

Wordpress site extremly slow in IE
I see you load a few scripts in the header, try relocate stuff in footer.php. Only load necessary stuff in the header. Could help. And test without... <!--[if lt IE 9]><script type="text/javascript" src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script><![endif]--> the to rule out, due it targets the browser where you encounter problems Overall good practice to handpick stuff, disable and check.

Categories : Wordpress



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