Search Results

Search found 3 results on 1 pages for 'qxxx'.

Page 1/1 | 1 

  • non www .htaccess redirect - ignore other subdomains.

    - by qxxx
    Hi, I have a .htaccess redirect for "non www" like this: RewriteEngine on RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] it is working. But, i have also some subdomains other than www. If I call for example http://shop.example.com it redirects me to: http://www.shop.example.com I dont want to write the subdomains into the .htaccess file, it should work automatically, just ignore anything else than www and '' like this: if subdomain =='' -> redirect to www.HTTP_HOST.... elseif subdomain !='' && subdomain !='www' -> do nothing. thanks!

    Read the article

  • How to get title from a website by xpath?

    - by qxxx
    I am playing around with xpath, but have no Idea how to for example get a title from a website using xpath, here is my code but I don't know what to do next... $dom = new DOMDocument(); $dom->loadHTMLFile("http://www.cool.de"); $x=new DOMXPath($dom); $result = $x->query("//TITLE"); //...??? and print_r($result) shows me only "Object", is there a function like print_r to see what is inside an object so I don't have to guess?

    Read the article

1