w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
The difference between Legacy Indexing/Auto Indexing and the new indexing approach in Neo4j
Yes, auto-indexes are a type of legacy index. Yes. Yes, you can for embedded. See an example here: Neo4j Embedded Fulltext Automatic Node Index The new "schema indexes" are the favored way to define indexes, based on labels. Legacy indexes are... the old way to do it. You can use them both together if needed.

Categories : Java

Google Not Indexing AJAX URLs
See GWT SE friendly application Suggestions include following the guide at http://code.google.com/web/ajaxcrawling/.

Categories : Ajax

Prevent google from indexing my pages as ssl
It doesn't sound like you have access to the root, so I think a robots.txt solution is out of the question, unless your host will add a Disallow: directive to https://myhostssl.com/robots.txt Instead of trying to solve the problem with .htaccess, you might want to consider just using a rel=canonical tag. So even though the URL is being passed through your host's SSL domain, the pages being crawled will still canonicalize to your domain. And since rel=canonicals are supported cross domain, you shouldn't see any of the SSL domains showing up after the pages have been re-crawled. Additionally, if your code base is serving a different page / template when it detects an SSL request, you can always add a meta tag or X-Robots-Tag in the HTTP Headers with a directive of noindex. This will tell t

Categories : Htaccess

Prevent google from indexing ajax loaded content
Try adding the following on your Ajax-delivered pages: <meta name="robots" content="noindex,nofollow" /> This will tell site crawlers to not crawl the page. You could also add the pages in robots.txt, like this: User-agent: * Disallow: /*?ajax=1 That would block any URL with ?ajax=1 from being indexed (providing a robot honours your robots.txt). A better solution would also involve creating a sitemap and telling various search engines about it. Edit A better way of delivering Ajax content IMO would be to send the following header when requesting your pages via Ajax: X-Requested-With: XMLHttpRequest jQuery will do this by default, so provided you can check for it on the server side, you could deliver your usual content e.g. without the template. You could then very easily de

Categories : HTML

Disable Google Indexing the HTTPS version of our website naked domain
GAE doesn't officially support naked domains. What you're seeing is a limitation of GAE, https://developers.google.com/appengine/kb/general#naked_domain

Categories : Google App Engine

Neo4j 2.0: Indexing array-valued properties with schema indexing
Schema indexes can only do exact matches right now. Your "testid" in n.sourceIds does not use the index (as shown by your query times). I think there are plans to make this behave better, but I'm waiting for them just as eagerly as you are. I've actually hit a lower max in the lucene query: 512. If there is a way to increase it I'd love to hear of it. The way I got around it is just doing more than one query if I have one of the rare cases that actually goes over 512 ids. What query are you doing where you need more?

Categories : Neo4j

Redirects within an iframe using php
With HTML5 the iframe sandbox attribute was added. At the time of writing this works on Chrome, Safari, Firefox and recent versions of IE and Opera but does pretty much what you want: <iframe src="url" sandbox="allow-forms allow-scripts"></iframe> If you want to allow top-level redirects specify sandbox="allow-top-navigation".

Categories : PHP

Caching redirects in asp.net
Programatically you can try something like this: Response.Cache.SetExpires(DateTime.Now.AddDays(1)); Response.Cache.SetCacheability(HttpCacheability.Private); Response.Cache.SetValidUntilExpires(true); Response.AddHeader("Vary", "User-Agent, Accept-Encoding"); Response.Redirect("http://www.avnetwork.com/index");

Categories : Asp Net

.htaccess ssl & non-ssl redirects
This first ruleset is redirecting all traffic to HTTPS when the requester has not indicated HTTPS, only when they're trying to reach the sign-in or register page. RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/(sign-in|register)+ [NC] RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L] This second rule is redirecting all traffic to non-SSL when HTTPS is requested and the URL is NOT sign-in or register. RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/(sign-in|register)+ [NC] RewriteRule ^(.*)$ http://%{SERVER_NAME}/$1 [R=301,L] Both redirects use 301 redirects which are cached by your browser, so if at some point you accidentally redirected to the wrong place, that might be used instead of what you have happening here. The problem is when you try to visit a page after

Categories : Htaccess

ASP.NET MVC 4 - 301 Redirects in RouteConfig.cs
You have to use RedirectPermanent, here's an example: public class RedirectController : Controller { public ActionResult News() { // your code return RedirectPermanent("/News"); } } in the global asax: routes.MapRoute( name: "News old route", url: "web/news/Default.aspx", defaults: new { controller = "Redirect", action = "News" } );

Categories : Asp Net Mvc

Are /me and redirects a good idea in API's?
1) If the client had to authenticate, then they should already know the current user. I'm not sure why you feel the need to track it and give it back to them, or provide a magic shortcut which looks it up. If you really want to do this, I'd suggest a separate resource for the currently authenticated user. 2) Looks like a 300 Multiple Choices is as close as you're going to get. Or possibly a 303 See Other. What you're describing sounds an awfully lot like having multiple canonical representations for a resource, which is considered non-RESTful.

Categories : PHP

My ajaxForm redirects to a PHP script
Try this: $(document).ready(function(){ $("#save").click(function(e){ e.preventDefault(); $("#f1").ajaxForm(); }); }); It should prevent your input from doing its default behavior of redirecting the page. Edit: To redirect to another page you should use something like: window.location.href = 'http://www.google.com'; on the ajax's Success event. Edit 2: Try this fiddle: http://jsfiddle.net/4hF6e/3/ Make sure your references are correct. Seems to me the AjaxForm plugin has some way to prevent default behavior on the button.

Categories : Jquery

webview having trouble with redirects
In order to do a redirect from one site to another, just load your website, but add a BOOL var for checking if the right page is loaded. BOOL page1Loaded; then, if you need to change to another site, just create a global NSString var like so // for site name NSString *urlAddress; and just update upon needing to if(page1Loaded) { // as seen in @Lithu T.V.'s comment, DO NOT FORGET the http:// or https:// // name of address urlAddress = @"http://..." or @"https://..." NSString *urlString = [NSURL URLWithString:urlAddress]; //URL Requst Object NSURLRequest *requestObj = [NSURLRequest requestWithURL:urlString]; //Load the request in the UIWebView. [self.webview loadRequest:requestObj]; } else { // as seen in @Lithu T.V.'s comment, DO NOT FO

Categories : IOS

Some types of 301 redirects working, some are not
Seems it was the order of entries in .htaccess. I needed to add the redirects before the default WordPress entries, not after as i was trying before: i.e: RewriteEngine On RewriteCond %{QUERY_STRING} ^$ RewriteRule ^pages/whyinstallr.htm$ /why-install/? [R=301,NE,NC,L] # 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> # END WordPress

Categories : Wordpress

MVC3 app redirects to ReturnUrl=%2f
This is correct behavior of the runtime. You told the engine to deny the access to unauthenticated users and also that the login url is located at ~/Home/Index. This is why when you navigate to the default url / the engine makes the browser go to the login page and passes the return url, encoded / in this case. The question is then: what you want to do if the correct behavior bothers you.

Categories : C#

Sammyjs - Allow javascript redirects
Solved it by adding the URL of my base page to the default catch all function as shown below //get inbox view when default page is visited this.get('User/Messages', function () { self.getInbox() }); This prevents the URL link from being trapped by the route if it points to a different page.

Categories : Misc

Zend Framework - Redirects
The _redirect method defaults to assuming you're giving it a path relative to the root of the current app - so even if you pass a URL starting with /, it'll append the base path to the front of it. You have two options: 1/ Give it a path relative to the project like it wants: $url = $this->getRequest()->getPathInfo(); # var_dump now shows $url=/admin/catalog/item/update/1 $this->_redirect($url); 2/ Pass an extra flag that tells the _redirect not to add the base path: $this->_redirect($url, array('prependBase' => false));

Categories : PHP

RewriteRule messing up 301 redirects
Just put them before the main redirect with L directive: Options +FollowSymlinks RewriteEngine on RewriteRule ^oldpage.html$ /dir/newpage.html [R=301,NC,L] RewriteRule ^oldpage2.html$ /dir/newpage2.html [R=301,NC,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /MySite/?q=$1

Categories : Apache

HTACCESS 301 Redirects with Variables
This is actually very simple to do using a single RewriteRule (although you can restrict the redirection based on the domain too by adding a RewriteCond). RewriteCond %{QUERY_STRING} !^$ RewriteCond %{HTTP_HOST} (www.)?example.com RewriteRule ^$ http://example.com/all/ [QSA,R=301] This will do the redirect, and should add the query string to the end of the redirected URL: http://www.example.com/?brand=123&color=red => http://example.com/all/?brand=123&color=red http://example.com/?brand=123&color=red&size=colin => http://example.com/all/?brand=123&color=red&size=colin Note however that as we're matching an empty path (the ^$ in the rule), it will not redirect any requests that are already in /all... or anything else for that matter: http://exampl

Categories : Htaccess

301 redirects after domain name change
You can set 301 permanent redirect from IIS also. If http redirection is enabled on old server then you have to put new web config with the contents - <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpRedirect enabled="true" destination="http://mynewsite.com/" httpResponseStatus="Permanent" /> </system.webServer> </configuration> Let me know if it helps.

Categories : Asp Net

Prestashop redirects itself to web root
Delete the .htaccess file (there's no need to regenerate it). Change your URL setup to match this: Hope this helps.

Categories : PHP

Return last URL in sequence of redirects
It's in the url attribute of your response object. >>> response = requests.get('http://bit.ly/bllsht') >>> response.url > u'http://www.thenews.org/sports/well-hey-there-murray-state-1-21-11-1.2436937' You could easily find this information in the “Quick Start” page.

Categories : Python

301 redirects and matching old maproutes to new ones
I wouldn't do this in a controller action as the request shouldn't really be reaching your MVC app with an incorrect route. It's unnecessary clutter when you can handle this with an IIS rewrite rule, by mapping capture groups: <rule name="OldNewRule" stopProcessing="true"> <match url="^([a-z]+)/([a-z]+)/([0-9]+)/([a-z0-9]+)$" ignoreCase="true" /> <action type="Redirect" url="http://www.new.com/{R:4}/buyer/{R:3}" redirectType="Permanent" /> <conditions> <add input="{HTTP_HOST}" pattern="www.old.com" /> </conditions> </rule> Here, I am assuming that your ID is numeric and your title is alphanumeric. This will grab your capture groups {R:3} and {R:4} (which are 'id' and 'mytitle', respectively) and reformat them into the proper

Categories : Asp Net Mvc

301 htaccess redirects with numbers in URL
This should work just fine given that mod_rewrite is enable and working: RewriteRule ^vb/thread(d+).html$ /forum/threads/$1/ [R=301,L] The left hand of the rule ^vb/thread(d+).html$ captures the numbers that comes after thread and before .html. The left side of the rule /forum/threads/$1/ redirects the URL adding at the end in place of $1 the captured number. For the URL you mentioned on the the comment http://www.domain.com/vb/showthread.php?t=1023 You can use: RewriteCond %{QUERY_STRING} ^t=(d+)$ RewriteRule ^vb/showthread.php$ /forum/threads/%1/? [R=301,L]

Categories : Htaccess

Ruby Curb not following redirects
It sounds as this server returns an empty reply[1] if you do not provide an user agent. To solve you problem just set one: ... easy.useragent = "curb" easy.perform [1]: curl -A '' -L http://stats.berr.gov.uk/... gives (52) Empty reply from server.

Categories : Ruby

How to Implement 301 Redirects with Django/Heroku
Django has redirects app, which allows to store redirects list in database: https://docs.djangoproject.com/en/dev/ref/contrib/redirects/ Also here a generic RedirectView: https://docs.djangoproject.com/en/1.3/ref/class-based-views/#redirectview And the lowest level is HttpResponseRedirect: https://docs.djangoproject.com/en/dev/ref/request-response/#django.http.HttpResponseRedirect

Categories : Python

Debug webpage redirects in browser
In chrome, in the debug window, at the very bottom, are a series of buttons. Click the button that is a dark black circle. It will preserve the log upon navigation. I think that is what you want.

Categories : Javascript

mod_rewrite redirects only index page
Ok replace your code with this: Options +FollowSymLinks RewriteEngine on RewriteCond %{REQUEST_FILENAME} robots.txt$ [NC] RewriteRule ^([^/]+) $1 [L] RewriteCond %{HTTP_HOST} ^(www.)?bd-spb.ru$ [NC] RewriteRule ^(.*)$ http://xn----8sbbkdenhe5aqs7a.xn--p1ai/$1 [R=301,L,B]

Categories : Regex

301 redirects not working for query strings
I think that if you do it like this, it could work (according to this http://httpd.apache.org/docs/current/en/mod/mod_alias.html#redirect): Redirect 301 /page.php http://www.mydomain.com/contact-us/ But it's not doing what you expected for. So I suggest these rules RewriteCond %{QUERY_STRING} (^|&)id=8(&|$) RewriteRule ^page.php http://www.mydomain.com/about-us/ [R=301,L] RewriteCond %{QUERY_STRING} (^|&)id=5(&|$) RewriteRule ^page.php http://www.mydomain.com/contact-us/ [R=301,L] I really don't know if that's the best way.

Categories : PHP

Joomla administrator redirects to installation
Diagnosing The Situation Perhaps you should start with diagnosing the plugins? By removing them all and adding in one by one to see what one causes an issue. As you recently updated, a plugin perhaps is causing this issue as it is outdated and is creating conflictions between the software and the extension. The issue may be based around that the configuration cannot be found, so Joomla presumes you have not installed the software. Have you done all of these? Removed installation folder Checked if .htaccess isn't causing the issue Attempt a downgrade and upgrade?

Categories : PHP

No redirects? Load content using javascript?
It is inaccessible. If the user agent doesn't support JavaScript, then no content will load. (Search engine indexing bots have very limited to no JS support). It is not robust. A tiny error or network failure when loading the JS will give you an outage. It is inefficient. Loading a page requires that the homepage be loaded and then the content be replaced by another page. Twitter stopped doing this because it was a horrible experience for users. The history api lets us have real URLs without depending on client side trickery. You get the benefits of the approach described in the question while mitigating most of the drawbacks. Alice can go to /foo/, the server can build /foo/ and the page can load quickly. She can then click a link to /bar/ and you can use pushState and XMLHttpReque

Categories : Javascript

Testing VAST 2.0 Redirects to run in HTML5 using an mp4
There are a bunch of Tremor wrapper examples on the IAB site. Check out this page: http://www.iab.net/guidelines/508676/digitalvideo/vast/vast_xml_samples And here is a linear wrapper: http://demo.tremorvideo.com/proddev/vast/vast_wrapper_linear_1.xml It redirects to an FLV in the end, but it does provide the wrapper example that you need.

Categories : Xml

PHP geolocation from mobile device without redirects
You might want to embed the js call with some image tag or ajax based method to directly post it php code .. or perhaps set some cookie for further processing.. For next request your php code will already have the geo loaction.

Categories : PHP

Multiple redirects using header plus alternative
Link tracking can be done in numerous ways. First make the links to the external pages reside inside anchor links that have targets set to _blank this will open in a new tab or window for the user. Next have the src of that anchor link go to another page on your domain (this page will control the redirect and the count) - also make sure to pass a parameter in the url to indicate either what link it was for or any other useful value you want to count. Then use PHP to on this new page to take the url parameters and store them in your DB that is logging the number of clicks. You can do this by matching the URL parameter that contains which link was clicked with the corresponding DB field and add a ++ to the variable you store it in then rewrite it to the DB. Then use the Header redirect t

Categories : PHP

HTTPS redirects to totally different website?
i think its a hosting issue. I had similar problem with subdomains, when on one of my subdomains completely different site appeared. Its due to on 1 server (ip) there are more than 1 domain (shared hosting) and it might be not configured properly. Ask your hosting provider support how they would explain and fix it, as this is obviously big security issue.

Categories : Http

What to do with Question Marks in HTAccess Redirects
If it's a single link you want to change you don't need a htaccess rule for that you can just do a redirect. redirect 301 /wordpress/?p=250 http://www.othersite.com/blog If the URL parameter changes you can use this rule. RewriteEngine on RewriteRule ^wordpress/(.*) http://www.othersite.com/blog [R=301,QSA,NC,L] Note that when you use the QSA flag it will append the URL with the query parameter so if that's what you want the resulting URL will be. http://www.othersite.com/blog?p=250 Otherwise if you remove the QSA flag, then it will just redirect to this http://www.othersite.com/blog

Categories : String

How to organize redirects which depends commit value
Maybe something like this: in view: <%= submit_tag 'Save', name: 'save' %> <%= submit_tag 'Save and continue editing', name: 'save_and_edit' %> in controller: def create @post = current_user.posts.build(params[:post]) if @post.save redirect_to(params[:commit] == 'save' ? admin_posts_path : edit_admin_post_path(@post), notice: "Post record has been created") else flash.now[:error] = "Post record has some validation errors" render :new end end

Categories : Ruby On Rails

How can window.opener works after redirects?
window.opener is not part of any standard, so it does whatever it wants... But https://developer.mozilla.org/en-US/docs/Web/API/window.opener states that is a reference to the window that created this window, which is in fact Page A. It is not the page that redirected to this page (just imagine, that would imply that all pages that have been visited in this session are still in memory and running!).

Categories : Javascript

Webview always redirects to twitter sign up url
Change the user agent of webview like : String newUA= "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0";// your_user_agent_setting mWebView.getSettings().setUserAgentString(newUA); In your setting you have maintained Safari in last and Mozila in start of your user agent setting

Categories : Android

htaccess sport links redirects
RewriteEngine On # HTTP_HOST if to match domain names only RewriteCond %{HTTP_HOST} ^www.onedomain.info$ [NC] # On the left hand we match the rest and on the right we redirect RewriteRule ^(.*)/(staticword.*)/?$ http://otherdomain.com/$1/$2 [R=302,L] Note that I am using 302, because you want to test it first before change it to 301 so your browser does not get cached with it until you are sure it's working as you want it to. So given your example http://onedomain.info/soccer/watchfe27789-mexico-vs-trinidad-and-tobago-gold-cu‌​p, the rule would be like this: RewriteEngine On # HTTP_HOST if to match domain names only RewriteCond %{HTTP_HOST} ^www.onedomain.info$ [NC] # On the left hand we match the rest and on the right we redirect RewriteRule ^(.*)/(watchfe27789.*)/?$ http://othe

Categories : Htaccess



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