qid int64 4 8.14M | question stringlengths 20 48.3k | answers list | date stringlengths 10 10 | metadata list | input stringlengths 12 45k | output stringlengths 2 31.8k |
|---|---|---|---|---|---|---|
6,209 | <p>I am building a multi language website in PHP and prepared all my strings in English by default using <code>gettext()</code><br />
My locale/it_IT/LC_MESSAGES/default.mo file is working correctly and now I need to sort out the language detection and switching.</p>
<p>I was thinking about using the approach with the... | [
{
"answer_id": 6211,
"author": "john",
"author_id": 660,
"author_profile": "https://webmasters.stackexchange.com/users/660",
"pm_score": 1,
"selected": true,
"text": "<p>Why not pass the locale all the time in the url?</p>\n\n<p>Like <code>http://yousite.com/en/index.php</code> and <code... | 2010/12/02 | [
"https://webmasters.stackexchange.com/questions/6209",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3591/"
] | I am building a multi language website in PHP and prepared all my strings in English by default using `gettext()`
My locale/it\_IT/LC\_MESSAGES/default.mo file is working correctly and now I need to sort out the language detection and switching.
I was thinking about using the approach with the GET parameter:
```... | Why not pass the locale all the time in the url?
Like `http://yousite.com/en/index.php` and `/it/index.php`?
This effectively solves your problem. |
6,218 | <p>just a quick question, <strong>is it possible to create an <em>FB Like</em> button in plain HTML?</strong> </p>
<p>I checked out the Like button code dircetly cerated by <a href="http://developers.facebook.com/docs/reference/plugins/like" rel="nofollow">developers.FB</a> but it's an </p>
<pre><code><iframe src=... | [
{
"answer_id": 6220,
"author": "Adam Thompson",
"author_id": 2595,
"author_profile": "https://webmasters.stackexchange.com/users/2595",
"pm_score": 4,
"selected": true,
"text": "<p>I don’t believe that this can be done. The code for the like button has to determine if you are logged into... | 2010/12/02 | [
"https://webmasters.stackexchange.com/questions/6218",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1429/"
] | just a quick question, **is it possible to create an *FB Like* button in plain HTML?**
I checked out the Like button code dircetly cerated by [developers.FB](http://developers.facebook.com/docs/reference/plugins/like) but it's an
```
<iframe src="http://www.facebook.com/plugins/like.php?href=...></iframe>
```
I a... | I don’t believe that this can be done. The code for the like button has to determine if you are logged into an account and if so, whether or not you’ve liked the topic already. This couldn’t be done in plain HTML. The closest you could get is the iframe that you mentioned. |
6,243 | <p>I am a web developer and I want to create clones of the sites I've developed for clients, so that I have an "original copy" on a subdomain of my own website, so that I can showcase my work to new clients.</p>
<p>What is the best way to not get my clients original websites penalised for duplicate content?</p>
<p>I ... | [
{
"answer_id": 6244,
"author": "Vergil Penkov",
"author_id": 3453,
"author_profile": "https://webmasters.stackexchange.com/users/3453",
"pm_score": 4,
"selected": true,
"text": "<p>Use robots.txt and put the following inside:</p>\n\n<pre><code>User-agent: *\nDisallow: /\n</code></pre>\n\... | 2010/12/03 | [
"https://webmasters.stackexchange.com/questions/6243",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3625/"
] | I am a web developer and I want to create clones of the sites I've developed for clients, so that I have an "original copy" on a subdomain of my own website, so that I can showcase my work to new clients.
What is the best way to not get my clients original websites penalised for duplicate content?
I am planning to ha... | Use robots.txt and put the following inside:
```
User-agent: *
Disallow: /
```
That's really all you need. Also, if a client's website is indexed as the original one, it won't get a penalty from duplicates. |
6,307 | <p>I link to my CV with the following:</p>
<pre><code> <li><a href="http://example.com/cv">CV</a></li>
</code></pre>
<p>However, should I have/would you recommend I have:</p>
<pre><code> <li><a href="http://example.com/cv"><abbr title="Curriculum vitae">CV</abbr></a... | [
{
"answer_id": 6309,
"author": "Vergil Penkov",
"author_id": 3453,
"author_profile": "https://webmasters.stackexchange.com/users/3453",
"pm_score": 0,
"selected": false,
"text": "<p>Yes, you can and this is the right way to do it.</p>\n\n<p>Whether you <strong>should</strong> - that's up... | 2010/12/04 | [
"https://webmasters.stackexchange.com/questions/6307",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I link to my CV with the following:
```
<li><a href="http://example.com/cv">CV</a></li>
```
However, should I have/would you recommend I have:
```
<li><a href="http://example.com/cv"><abbr title="Curriculum vitae">CV</abbr></a></li>
```
Is the nesting of those tags ok to do/semantically appropriate, etc.
Thank... | I would totally do this, but I wouldn't stop there. I'd throw a little Microdata in there also, making it:
`<li><a href="http://example.com/cm" rel="me"><abbr title="Curriculm vitae">CV</abbr></a></li>`
I'd go one step further if you're using [hCard](http://microformats.org/wiki/hcard) and add a `class="url"` but tha... |
6,330 | <p>What markup is the modern standard for adding a favicon to my site? What is the standard image format and size?</p>
| [
{
"answer_id": 6331,
"author": "Nick Craver",
"author_id": 274,
"author_profile": "https://webmasters.stackexchange.com/users/274",
"pm_score": 3,
"selected": false,
"text": "<p>To work in all browsers, <code>.ico</code> is preferred, as for the size, 32x32 is the most widely used, 16x16... | 2010/12/05 | [
"https://webmasters.stackexchange.com/questions/6330",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2995/"
] | What markup is the modern standard for adding a favicon to my site? What is the standard image format and size? | To work in all browsers, `.ico` is preferred, as for the size, 32x32 is the most widely used, 16x16 also works (this is the actual size used in the browser in most places).
Also not in your question, they should be 8 or 24bit color depth.
It may be worth noting, if you plan on iWhatever users bookmarking your site, t... |
6,333 | <p>Should I do:<br />
A: translate the language links in the current language: (if I am on the English version)</p>
<pre><code><a href="en/">English</a> |
<a href="it/">Italian</a> |
<a href="fr/">French
</code></pre>
<p>B: the links in the native languages:</p>
<pre><code><a href=... | [
{
"answer_id": 6338,
"author": "Rowland Shaw",
"author_id": 1918,
"author_profile": "https://webmasters.stackexchange.com/users/1918",
"pm_score": 3,
"selected": true,
"text": "<p>You could turn this question on its head; let's say you land on the page, and the current language is Russia... | 2010/12/05 | [
"https://webmasters.stackexchange.com/questions/6333",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3591/"
] | Should I do:
A: translate the language links in the current language: (if I am on the English version)
```
<a href="en/">English</a> |
<a href="it/">Italian</a> |
<a href="fr/">French
```
B: the links in the native languages:
```
<a href="en/">English</a> |
<a href="it/">Italiano</a> |
<a href="fr/">Français... | You could turn this question on its head; let's say you land on the page, and the current language is Russian; which of these do you pick to get to something you understand?
* французский
* английский
* итальянский
* русский
From a usability perspective, I'd say that the language names should always be in their nativ... |
6,397 | <p>I'm trying to set up this <em>damn FB</em> page for the company where I'm working for.</p>
<p>I think it's probably useless stuff, but I want to give a try.</p>
<p>I came up with this page:</p>
<pre><code>www.facebook.com/pages/Poste-Certificateit-PEC-per-societa/168391856527591
</code></pre>
<p>Then I saw compa... | [
{
"answer_id": 6399,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 3,
"selected": true,
"text": "<p>A page has to have 25 fans/likes before they can select a vanity URL. If a page doesn't have enough fans/likes... | 2010/12/06 | [
"https://webmasters.stackexchange.com/questions/6397",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1429/"
] | I'm trying to set up this *damn FB* page for the company where I'm working for.
I think it's probably useless stuff, but I want to give a try.
I came up with this page:
```
www.facebook.com/pages/Poste-Certificateit-PEC-per-societa/168391856527591
```
Then I saw company pages with simple URLs, like this:
```
www.... | A page has to have 25 fans/likes before they can select a vanity URL. If a page doesn't have enough fans/likes or doesn't choose a vanity URL they will use the default one assigned to them by Facebook. |
6,419 | <p>After I re-designed my website, Google stoped ranking my page. I have no idea why.</p>
<p>I'm not banned from Google, because my website <a href="http://www.google.no/search?client=opera&rls=en-GB&q=norwegianfashion&sourceid=opera&ie=utf-8&oe=utf-8" rel="nofollow">is position #1 on the search</a... | [
{
"answer_id": 6421,
"author": "Dan Diplo",
"author_id": 914,
"author_profile": "https://webmasters.stackexchange.com/users/914",
"pm_score": 1,
"selected": false,
"text": "<p>Your site is obviously being indexed by Google as <a href=\"http://www.google.co.uk/search?q=site%3Ahttp%3A%2F%2... | 2010/12/07 | [
"https://webmasters.stackexchange.com/questions/6419",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3720/"
] | After I re-designed my website, Google stoped ranking my page. I have no idea why.
I'm not banned from Google, because my website [is position #1 on the search](http://www.google.no/search?client=opera&rls=en-GB&q=norwegianfashion&sourceid=opera&ie=utf-8&oe=utf-8).
And my META tags for robots look like this:
```
<me... | I checked your site on the same tool and it gave a PageRank of 3.
But it doesn't matter. PageRank *is not* "ranking". You could have PR of 1 or 5 and it wouldn't really make a massive difference. I've said before, PageRank takes a trillion pages on the Internet and boils them all down to one of 10 integers.
You said ... |
6,435 | <p>A client recently asked me this, looking at our portfolios:<br>
<code>Does your company provide a service or a product?</code></p>
<p>Me, as a designer who does not like to put things in boxes, then close them, and them label them either one of two words, i put my eyebrows as high as ai can and said:<br>
<code>that... | [
{
"answer_id": 6437,
"author": "Davis Peixoto",
"author_id": 2293,
"author_profile": "https://webmasters.stackexchange.com/users/2293",
"pm_score": 2,
"selected": false,
"text": "<p>This is technical-semantic question.</p>\n\n<p>Software is a product. You can pack it (copy to a CD or a p... | 2010/12/07 | [
"https://webmasters.stackexchange.com/questions/6435",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3590/"
] | A client recently asked me this, looking at our portfolios:
`Does your company provide a service or a product?`
Me, as a designer who does not like to put things in boxes, then close them, and them label them either one of two words, i put my eyebrows as high as ai can and said:
`that depends on the project!`
S... | I follow your logic in determining product versus service. However, I see this industry as one which provides "professional services" (a term used by accountants, economists, bankers, etc.), as opposed to selling products.
You may product-ize your services by assigning them names, features, and fixed prices, but reall... |
6,504 | <p>I have an HTML file with the following markup in the head tag:</p>
<pre><code><link rel="shortcut icon" href="myFavicon.ico" />
</code></pre>
<p>With that, I expect to see my "myFavicon.ico" icon display in Chrome's tab and bookmark bar, but instead it's showing Youtube's favicon (i have a link to youtube in... | [
{
"answer_id": 6505,
"author": "Joel Spolsky",
"author_id": 10,
"author_profile": "https://webmasters.stackexchange.com/users/10",
"pm_score": 2,
"selected": false,
"text": "<p>Try renaming your favicon file to be favicon.ico and putting it in the root (/) directory.</p>\n"
},
{
... | 2010/12/09 | [
"https://webmasters.stackexchange.com/questions/6504",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3754/"
] | I have an HTML file with the following markup in the head tag:
```
<link rel="shortcut icon" href="myFavicon.ico" />
```
With that, I expect to see my "myFavicon.ico" icon display in Chrome's tab and bookmark bar, but instead it's showing Youtube's favicon (i have a link to youtube in my markup). This make's no sens... | Try renaming your favicon file to be favicon.ico and putting it in the root (/) directory. |
6,548 | <p>Based on other discussions on this site and elsewhere, using flags to identify languages is the path to madness.</p>
<p>Nevertheless, I need an easy way to identify the language of individual content items on my site. I was thinking a bracketed 3 letter prefix might do the trick:</p>
<pre><code>[ENG] - English
[FR... | [
{
"answer_id": 6549,
"author": "Mark Henderson",
"author_id": 138,
"author_profile": "https://webmasters.stackexchange.com/users/138",
"pm_score": 1,
"selected": false,
"text": "<p>I see no problems with this for anyone using a modern browser. You might want to add some metadata/microdat... | 2010/12/10 | [
"https://webmasters.stackexchange.com/questions/6548",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3574/"
] | Based on other discussions on this site and elsewhere, using flags to identify languages is the path to madness.
Nevertheless, I need an easy way to identify the language of individual content items on my site. I was thinking a bracketed 3 letter prefix might do the trick:
```
[ENG] - English
[FRE] - French
[FRA] - F... | I don't think reinventing the wheel is the right path.
There are a lot of standards currently on use. I think if you wanna markup your elements correctly, start from the basis: there is a global HTML attribute named **lang** for this purpose.
```
<html lang='de-de'>
<html lang='en-us'>
...
```
for an element only
... |
6,569 | <p>Guys I'm trying to center this simple ul here. Any idea on whats wrong ?</p>
<p>Css:</p>
<pre><code>ul {
margin-left: auto;
margin-right: auto;
}
li {
display: inline;
background-color: gray;
color: white;
list-style: none;
margin: 5px;
padding: 5px;
}
</code></pre>
<p>JSP/HTML:</... | [
{
"answer_id": 6571,
"author": "Davis Peixoto",
"author_id": 2293,
"author_profile": "https://webmasters.stackexchange.com/users/2293",
"pm_score": 0,
"selected": false,
"text": "<p>Check <a href=\"http://matthewjamestaylor.com/blog/2\" rel=\"nofollow\">http://matthewjamestaylor.com/blog... | 2010/12/10 | [
"https://webmasters.stackexchange.com/questions/6569",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3785/"
] | Guys I'm trying to center this simple ul here. Any idea on whats wrong ?
Css:
```
ul {
margin-left: auto;
margin-right: auto;
}
li {
display: inline;
background-color: gray;
color: white;
list-style: none;
margin: 5px;
padding: 5px;
}
```
JSP/HTML:
>
>
> ```
> <ul>
> <li>... | Because even though the `ul` centers (with the margin: auto) it's a block element so it spans the entire width of the element. There is no room for margin on either side of it, you'll have to specify a width for the `ul` element for this to work. |
6,584 | <p>Using Google Webmaster tools my site is set to 'Display URLs as www.mydomain.com' as opposed 'mydomain.com'. This is the setting for both of these sites in Webmaster tools and has been for several months now.</p>
<p>Google has honoured this, but recently the site's ranking has started to improve and it is ranking f... | [
{
"answer_id": 6609,
"author": "Dobry Den",
"author_id": 3819,
"author_profile": "https://webmasters.stackexchange.com/users/3819",
"pm_score": 2,
"selected": false,
"text": "<p>Even though you set a preference, Google still doesn't truly know which one you prefer if there's no domain.co... | 2010/12/10 | [
"https://webmasters.stackexchange.com/questions/6584",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2297/"
] | Using Google Webmaster tools my site is set to 'Display URLs as www.mydomain.com' as opposed 'mydomain.com'. This is the setting for both of these sites in Webmaster tools and has been for several months now.
Google has honoured this, but recently the site's ranking has started to improve and it is ranking for search ... | Even though you set a preference, Google still doesn't truly know which one you prefer if there's no domain.com --> www.domain.com rewrite or 301 redirect. Backlinks that point to domain.com rather than www.domain.com will also confuse Googlebot as your non-www domain still looks relevant.
The easiest method would be ... |
6,621 | <p>I want to implement a rewrite rule in my .htaccess file to show a specific url as a directory of my server. See the code below I written,</p>
<pre><code>RewriteRule ^(.*)/$ ?page=$1 [NC]
</code></pre>
<p>This will rewrites urls like <code>www.mysite.com/abc/</code> to <code>www.mysite.com/index.php?page=abc</code>... | [
{
"answer_id": 6631,
"author": "Stephan Muller",
"author_id": 3467,
"author_profile": "https://webmasters.stackexchange.com/users/3467",
"pm_score": 3,
"selected": true,
"text": "<p><strong>update</strong></p>\n\n<pre><code>RewriteCond !-d\nRewriteRule ^(.*)/$ ?page=$1 [NC,L]\n\nRewriteC... | 2010/12/11 | [
"https://webmasters.stackexchange.com/questions/6621",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1171/"
] | I want to implement a rewrite rule in my .htaccess file to show a specific url as a directory of my server. See the code below I written,
```
RewriteRule ^(.*)/$ ?page=$1 [NC]
```
This will rewrites urls like `www.mysite.com/abc/` to `www.mysite.com/index.php?page=abc`.
But if I request `www.mysite.com/abc` then ... | **update**
```
RewriteCond !-d
RewriteRule ^(.*)/$ ?page=$1 [NC,L]
RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^(.*)$ ?page=$1 [NC,L]
```
This first rewrites urls with a slash, but only if it's not an existing directory.
If that's not found it rewrites urls without a slash (but only if it's not index.php, so... |
6,643 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://webmasters.stackexchange.com/questions/9947/how-can-i-buy-a-domain-that-has-already-been-registered">How can I buy a domain that has already been registered?</a> </p>
</blockquote>
<p>How can I buy the domain name <code>www.autospell.com<... | [
{
"answer_id": 6644,
"author": "Skorpioh",
"author_id": 18562,
"author_profile": "https://webmasters.stackexchange.com/users/18562",
"pm_score": 0,
"selected": false,
"text": "<p>Usually you can find registred but not actively used domains at websites like <a href=\"http://www.sedo.com\"... | 2010/12/12 | [
"https://webmasters.stackexchange.com/questions/6643",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | >
> **Possible Duplicate:**
>
> [How can I buy a domain that has already been registered?](https://webmasters.stackexchange.com/questions/9947/how-can-i-buy-a-domain-that-has-already-been-registered)
>
>
>
How can I buy the domain name `www.autospell.com`.
It seems to have a weird status with no website, but ... | Normally you can get the name of the domain holder directly from a [whois lookup](http://whois.domaintools.com/autospell.com). But in this case the resulting data is:
```
Domain Name: AUTOSPELL.COM
Registrar: TUCOWS INC.
Whois Server: whois.tucows.com
Referral URL: http://domainhelp.opensrs.net
Name Server: NS1.DSREDI... |
6,659 | <p>What is the "best" setup for robots.txt?<br>
I'm using the following permalink structure in Wordpress: <code>/%category%/%postname%/</code>.</p>
<p>My robots.txt currently looks like this (copied from somewhere a long time ago):</p>
<pre><code>User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-incl... | [
{
"answer_id": 6670,
"author": "vilepickle",
"author_id": 3562,
"author_profile": "https://webmasters.stackexchange.com/users/3562",
"pm_score": 0,
"selected": false,
"text": "<ol>\n<li>You should be safe to remove the */comments line if you want to index comments.</li>\n<li>From what I'... | 2010/12/13 | [
"https://webmasters.stackexchange.com/questions/6659",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3720/"
] | What is the "best" setup for robots.txt?
I'm using the following permalink structure in Wordpress: `/%category%/%postname%/`.
My robots.txt currently looks like this (copied from somewhere a long time ago):
```
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content/plugin... | The WordPress Codex has an example SEO optimized robots.txt file: <http://codex.wordpress.org/Search_Engine_Optimization_for_WordPress#Robots.txt_Optimization>
I use the following in the functions.php file of my theme to handle it:
```
// add to robots.txt
add_action('do_robots', 'roots_robots');
function roots_robo... |
6,660 | <p>Greetings Friends,</p>
<p>Is there a standard set of downloadable styles that I can overlay on my graphics to simulate the various types of colour-blindness? Ideally for Photoshop or Fireworks.</p>
<p>Many thanks</p>
| [
{
"answer_id": 6670,
"author": "vilepickle",
"author_id": 3562,
"author_profile": "https://webmasters.stackexchange.com/users/3562",
"pm_score": 0,
"selected": false,
"text": "<ol>\n<li>You should be safe to remove the */comments line if you want to index comments.</li>\n<li>From what I'... | 2010/12/13 | [
"https://webmasters.stackexchange.com/questions/6660",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | Greetings Friends,
Is there a standard set of downloadable styles that I can overlay on my graphics to simulate the various types of colour-blindness? Ideally for Photoshop or Fireworks.
Many thanks | The WordPress Codex has an example SEO optimized robots.txt file: <http://codex.wordpress.org/Search_Engine_Optimization_for_WordPress#Robots.txt_Optimization>
I use the following in the functions.php file of my theme to handle it:
```
// add to robots.txt
add_action('do_robots', 'roots_robots');
function roots_robo... |
6,736 | <p>I am trying to submit <em>sitemap.xml</em> (Index) to Yahoo Site Explorer but with no luck.
I tried using <strong>website feed</strong> option in the site explorer to submit the sitemap, but I got validation errors. However, when submitting the same sitemap to Google Webmaster Tools, the sitemap was validated succes... | [
{
"answer_id": 9342,
"author": "Su'",
"author_id": 4502,
"author_profile": "https://webmasters.stackexchange.com/users/4502",
"pm_score": 2,
"selected": false,
"text": "<p>No. <a href=\"http://community.godaddy.com/help/1488/can-i-add-perl-modules-to-my-hosting-account\" rel=\"nofollow\"... | 2010/12/15 | [
"https://webmasters.stackexchange.com/questions/6736",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3175/"
] | I am trying to submit *sitemap.xml* (Index) to Yahoo Site Explorer but with no luck.
I tried using **website feed** option in the site explorer to submit the sitemap, but I got validation errors. However, when submitting the same sitemap to Google Webmaster Tools, the sitemap was validated successfully. Could it be for... | No. [Their process](http://community.godaddy.com/help/1488/can-i-add-perl-modules-to-my-hosting-account) involves going through your account. They have several data centers, so it's conceivable their systems aren't always in sync. This would ensure that whatever information they show you actually applies to you. If you... |
6,786 | <p>At a webshop I'm currently working on I have several links that show a fancybox with product information.</p>
<p>The link works without ajax, it shows the same content as the fancybox links etc will not work.</p>
<p>My question is this, is it considered bad/blackhat to redirect everyone except googlebot back to th... | [
{
"answer_id": 6789,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 2,
"selected": false,
"text": "<p>Google recommends the following in its <a href=\"http://www.google.com/support/webmasters/bin/answer.py?hl=en&... | 2010/12/16 | [
"https://webmasters.stackexchange.com/questions/6786",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3926/"
] | At a webshop I'm currently working on I have several links that show a fancybox with product information.
The link works without ajax, it shows the same content as the fancybox links etc will not work.
My question is this, is it considered bad/blackhat to redirect everyone except googlebot back to the page showing th... | Google recommends the following in its [Webmaster Guidelines](http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35769):
>
> Don't deceive your users or present
> different content to search engines
> than you display to users, which is
> commonly referred to as "cloaking."
>
>
>
Instead of gi... |
6,791 | <p>i want to have an image behind my google adsense
just like the below image
<img src="https://i.stack.imgur.com/Lr8oX.jpg" alt="alt text"></p>
<p>but when i tried the following css</p>
<pre><code>L{
background: transparent url("http://www.triphp.com/images/adback.png") repeat-x left bottom; padding-bottom:0px; ... | [
{
"answer_id": 6792,
"author": "S Philp",
"author_id": 3903,
"author_profile": "https://webmasters.stackexchange.com/users/3903",
"pm_score": 3,
"selected": true,
"text": "<p>If you look it's not an image that's behind the ad it's a background colour. Controlled from your adsense setup.<... | 2010/12/16 | [
"https://webmasters.stackexchange.com/questions/6791",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3656/"
] | i want to have an image behind my google adsense
just like the below image

but when i tried the following css
```
L{
background: transparent url("http://www.triphp.com/images/adback.png") repeat-x left bottom; padding-bottom:0px; padding-top:0px;
height: 352px;... | If you look it's not an image that's behind the ad it's a background colour. Controlled from your adsense setup.
if you go into your ads and edit it. You'll see options to edit "style". You can then choose the background colour you desire :)
Hope the above makes sense :) |
6,816 | <p>I want all requests on a domain to be redirected to <code>https</code>, with the exception of just one particular file. I'm not sure how to accomplish this with .htaccess </p>
<pre><code>-bash-3.2# cat .htaccess
ErrorDocument 404 http://www.example.com
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*... | [
{
"answer_id": 6821,
"author": "Davis Peixoto",
"author_id": 2293,
"author_profile": "https://webmasters.stackexchange.com/users/2293",
"pm_score": -1,
"selected": false,
"text": "<p>This would fit better in serverfault but...</p>\n\n<p>You can work with a pre-condition first. Something ... | 2010/12/17 | [
"https://webmasters.stackexchange.com/questions/6816",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3946/"
] | I want all requests on a domain to be redirected to `https`, with the exception of just one particular file. I'm not sure how to accomplish this with .htaccess
```
-bash-3.2# cat .htaccess
ErrorDocument 404 http://www.example.com
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.co... | ```
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteCond %{REQUEST_URI} !robots\.txt
RewriteRule .* https://www.example.com/$0 [R,L]
```
Note that `HTTPS` is a more reliable indicator of whether or not SSL is enabled. |
6,819 | <pre><code>RewriteRule ^([A-Za-z0-9_\-]+)$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+)/$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)/$ /userviewproducts.php?category=$1... | [
{
"answer_id": 6820,
"author": "dunxd",
"author_id": 1379,
"author_profile": "https://webmasters.stackexchange.com/users/1379",
"pm_score": 1,
"selected": false,
"text": "<p>Read up on <a href=\"http://www.regular-expressions.info\" rel=\"nofollow\">Regular Expressions</a>. A better und... | 2010/12/17 | [
"https://webmasters.stackexchange.com/questions/6819",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2579/"
] | ```
RewriteRule ^([A-Za-z0-9_\-]+)$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+)/$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)/$ /userviewproducts.php?category=$1 [L]
Re... | Try this:
```
RewriteRule ^([A-Za-z0-9_\-]+)/?$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)/?$ /userviewproducts.php?category=$1 [L]
RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)/?$ /viewbuyproduct.php?1=$1 [L]
```
It's shorter. |
6,915 | <p>I'm trying to create a website that accepts submissions into a form, and then later on I can display it in tables organized by categories, similar to how RateMyProfessors does it:</p>
<p><a href="http://www.ratemyprofessors.com/SelectTeacher.jsp?sid=399" rel="nofollow">http://www.ratemyprofessors.com/SelectTeacher.... | [
{
"answer_id": 6916,
"author": "Steven",
"author_id": 3998,
"author_profile": "https://webmasters.stackexchange.com/users/3998",
"pm_score": 2,
"selected": false,
"text": "<p>I assume that you don't have particularly strong development experience (if this is an incorrect assumption, give... | 2010/12/20 | [
"https://webmasters.stackexchange.com/questions/6915",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3981/"
] | I'm trying to create a website that accepts submissions into a form, and then later on I can display it in tables organized by categories, similar to how RateMyProfessors does it:
<http://www.ratemyprofessors.com/SelectTeacher.jsp?sid=399>
To me, my main concerns are:
* Figuring out a good way to read in
submissions... | Your two concerns are pretty "low level", thus satisfied by just about any option you pick. Most frameworks have "HTML Helpers" that can generate forms for you.
For example, in CodeIgniter, this:
```
form_open('register/complete');
form_input('username');
form_input('password');
form_input('password_confirmation');
f... |
6,923 | <p><br/>
Let's say I want to write a simple menu in HTML5.</p>
<p>Should I write like this:</p>
<pre><code><h1>My Menu</h1>
<h2>Submenu 1</h2>
<nav>
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li&... | [
{
"answer_id": 6924,
"author": "Piers Karsenbarg",
"author_id": 3307,
"author_profile": "https://webmasters.stackexchange.com/users/3307",
"pm_score": 2,
"selected": false,
"text": "<p>h tags are for the structure of the content of the page. I wouldn't say navigation is part of the conte... | 2010/12/20 | [
"https://webmasters.stackexchange.com/questions/6923",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3955/"
] | Let's say I want to write a simple menu in HTML5.
Should I write like this:
```
<h1>My Menu</h1>
<h2>Submenu 1</h2>
<nav>
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
...
</ul>
</nav>
<h2>Submenu 2</h2>
<nav>
<ul>
<li><a href="#">Link 1</a></li>
... | According to the HTML5 spec, "nav" is a "section" and a section "is content that defines the scope of headings and footers." The W3C example for the nav section shows h tags in the the nav.
<http://www.w3.org/TR/html5/sections.html#the-nav-element> |
6,988 | <p>I cannot seem to receive a google page rank for encryptstick.com the site has been live for about 5 months now, we have very good linking from sources such as pcworld.com, cnet.com, pcmag.com etc.</p>
<p>The website is magento based, could there be an issue with magento that is blocking google from reading & ra... | [
{
"answer_id": 6989,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 1,
"selected": false,
"text": "<p>A Google search for <a href=\"http://www.google.com/search?q=site%3Aencryptstick.com\" rel=\"nofollow\">site:e... | 2010/12/22 | [
"https://webmasters.stackexchange.com/questions/6988",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I cannot seem to receive a google page rank for encryptstick.com the site has been live for about 5 months now, we have very good linking from sources such as pcworld.com, cnet.com, pcmag.com etc.
The website is magento based, could there be an issue with magento that is blocking google from reading & ranking the site... | You just need to be patient and get your site out there. Searching for `site:encryptstick.com` shows plenty of pages so the site is being indexed fine. A search for "encrypt stick" shows you as #1.
If you want to check Google Webmaster Tools for errors, the best place to look is Diagnostics > Crawl Errors. You might a... |
6,990 | <p>Does the <code><span></code> element have any SEO side-effects? Are there any semantic preferences between the following two or parsing differences between search engines?</p>
<h2>Clean <code><h1></code>:</h2>
<pre><code><h1>Search Optimised Heading</h1>
</code></pre>
<h2>vs <code><span... | [
{
"answer_id": 6993,
"author": "Wabbitseason",
"author_id": 1273,
"author_profile": "https://webmasters.stackexchange.com/users/1273",
"pm_score": 4,
"selected": true,
"text": "<p>There should be no difference. The <code><span></code> element has no semantic meaning whatsoever.</p>... | 2010/12/22 | [
"https://webmasters.stackexchange.com/questions/6990",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1689/"
] | Does the `<span>` element have any SEO side-effects? Are there any semantic preferences between the following two or parsing differences between search engines?
Clean `<h1>`:
-------------
```
<h1>Search Optimised Heading</h1>
```
vs `<span>` in `<h1>`:
----------------------
```
<h1>Search <span class="someColour... | There should be no difference. The `<span>` element has no semantic meaning whatsoever. |
7,002 | <p>I have a personal website that has around 4 - 5 HTML pages that I modify on a local editor (Kompozer) and then upload it to my website running on Apache.</p>
<p>I have seen many a times, pages have the footer as: 'Last modified date: ' or something like this, the date when the page was last updated.</p>
<p>How do ... | [
{
"answer_id": 7004,
"author": "Marco Demaio",
"author_id": 1429,
"author_profile": "https://webmasters.stackexchange.com/users/1429",
"pm_score": 4,
"selected": true,
"text": "<p>If using PHP, just add this string in your HTML pages:</p>\n\n<pre><code><?php echo \"Page last modified:... | 2010/12/22 | [
"https://webmasters.stackexchange.com/questions/7002",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I have a personal website that has around 4 - 5 HTML pages that I modify on a local editor (Kompozer) and then upload it to my website running on Apache.
I have seen many a times, pages have the footer as: 'Last modified date: ' or something like this, the date when the page was last updated.
How do I do the same for... | If using PHP, just add this string in your HTML pages:
```
<?php echo "Page last modified: " . date ("F d Y H:i:s.", filemtime(__FILE__)); ?>
``` |
7,011 | <p>Imagine situation where multiple aliases point to the same server, where htacces divides them into their own language folders.</p>
<pre><code>Example:
mywebsite.fr >> /fr/home
mywebsite.de >> /de/home
mywebsite.it >> /it/home
about seven more domains...
</code></pre>
<p><strong>Possible ... | [
{
"answer_id": 7014,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 3,
"selected": true,
"text": "<p>None of the above. PR is <em>per page</em>, not per site or per directory or URL structure, etc. Each page's P... | 2010/12/22 | [
"https://webmasters.stackexchange.com/questions/7011",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3590/"
] | Imagine situation where multiple aliases point to the same server, where htacces divides them into their own language folders.
```
Example:
mywebsite.fr >> /fr/home
mywebsite.de >> /de/home
mywebsite.it >> /it/home
about seven more domains...
```
**Possible options to maintain in terms of SEO:**
1. Dont d... | None of the above. PR is *per page*, not per site or per directory or URL structure, etc. Each page's PR is determined using the PR formula which is based on *link popularity*. |
7,023 | <p>We all know the importance and significance of Headings for Professional Webmasters. These were known for professional developers as: <code><h1>Heading 1</h1></code>, and H2 through H6.</p>
<p>As a daring web developer, lately I needed more short headings for complex structured document and I thought ab... | [
{
"answer_id": 7024,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 4,
"selected": true,
"text": "<p>1) The <a href=\"http://www.w3.org/\">w3c</a> decided this as they are the ones who wrote the HTML 4 specs.</p... | 2010/12/22 | [
"https://webmasters.stackexchange.com/questions/7023",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3590/"
] | We all know the importance and significance of Headings for Professional Webmasters. These were known for professional developers as: `<h1>Heading 1</h1>`, and H2 through H6.
As a daring web developer, lately I needed more short headings for complex structured document and I thought about this and used these in my CSS... | 1) The [w3c](http://www.w3.org/) decided this as they are the ones who wrote the HTML 4 specs.
2) Because they don't exist. Since browsers are supposed to ignore incorrect HTML tags they simply display the content and ignore the tag. (I don't know what IE 8 does but it's probably incorrect if it is not displaying the ... |
7,130 | <p>Nowadays often what was accomplished with an <code><img></code> tag is now done with something like a <code><div></code> with a CSS background image set using a CSS 'sprite' and an offset.</p>
<p>I was wondering what kind of an effect his has on SEO, as effectively we lose the <code>alt</code> attribute... | [
{
"answer_id": 7131,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 6,
"selected": true,
"text": "<p><a href=\"http://www.smashingmagazine.com/2010/03/26/css-sprites-useful-technique-or-potential-nuisance/\">CSS ... | 2010/12/27 | [
"https://webmasters.stackexchange.com/questions/7130",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3312/"
] | Nowadays often what was accomplished with an `<img>` tag is now done with something like a `<div>` with a CSS background image set using a CSS 'sprite' and an offset.
I was wondering what kind of an effect his has on SEO, as effectively we lose the `alt` attribute (which is indexed by Google), and are stuck with the '... | [CSS sprites should only be used for decorative elements](http://www.smashingmagazine.com/2010/03/26/css-sprites-useful-technique-or-potential-nuisance/) for this reason - use `<img>` for elements which are specific to a page and use sprites for decorative elements which are not contextually relevant to the content pre... |
7,136 | <p>Please consider a list of items (forum comments, articles, shoes, doesn't matter) which are spread over multiple pages. Different sort orders are supported (by date, by popularity, by price, etc).</p>
<p>So, an URL might look like this (I use the query style here to simplify things):</p>
<p>/items?id=1234&page... | [
{
"answer_id": 7137,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 0,
"selected": false,
"text": "<p>Use Google Webmaster Tools to <a href=\"http://searchengineland.com/google-lets-you-tell-them-which-url-parame... | 2010/12/27 | [
"https://webmasters.stackexchange.com/questions/7136",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4125/"
] | Please consider a list of items (forum comments, articles, shoes, doesn't matter) which are spread over multiple pages. Different sort orders are supported (by date, by popularity, by price, etc).
So, an URL might look like this (I use the query style here to simplify things):
/items?id=1234&page=42&sort=popularity
... | Use a rel="canonical" link tag. It exists for this purpose. It was suggested first by google, but whatwg and w3c are in ways to approve it as spec.
Per your comments on @danlefree answer, your concern maybe related to URL rewriting to user-friendly URLs, ie, you are used to <http://www.domain.tld/apples/weight/>, inst... |
7,138 | <p>I wonder if it's safe to use font-face with special dingbats fonts. What are good dingbats that you can recommend to use this way? What are the tips and tricks? Thanks.</p>
| [
{
"answer_id": 7146,
"author": "Yi Jiang",
"author_id": 4131,
"author_profile": "https://webmasters.stackexchange.com/users/4131",
"pm_score": 3,
"selected": false,
"text": "<blockquote>\n <p>I wonder if it's safe to use font-face with special dingbats fonts.</p>\n</blockquote>\n\n<p>It... | 2010/12/27 | [
"https://webmasters.stackexchange.com/questions/7138",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4128/"
] | I wonder if it's safe to use font-face with special dingbats fonts. What are good dingbats that you can recommend to use this way? What are the tips and tricks? Thanks. | >
> I wonder if it's safe to use font-face with special dingbats fonts.
>
>
>
It's not - have a look at [this article](http://filamentgroup.com/lab/dingbat_webfonts_accessibility_issues/) for more information. The article presents a simple example:
```
<button type="submit">Purchase <span class="icon">6</span></... |
7,139 | <p>Some search engines (including Google and Bing) display a star rating for things like movies and downloads on sites such as IMDB and cnet.</p>
<p><img src="https://i.stack.imgur.com/4khN5.png" alt="screenshot"></p>
<p>How can I configure my site to provide this data?</p>
| [
{
"answer_id": 7142,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 0,
"selected": false,
"text": "<p>It's <a href=\"http://microformats.org/\" rel=\"nofollow\">microformats</a> (<a href=\"http://googlewebmaster... | 2010/12/28 | [
"https://webmasters.stackexchange.com/questions/7139",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/215/"
] | Some search engines (including Google and Bing) display a star rating for things like movies and downloads on sites such as IMDB and cnet.

How can I configure my site to provide this data? | Use a Review [Microformat](http://blog.mozilla.com/faaborg/2006/12/11/microformats-part-0-introduction/). Google has [good documentation](http://www.google.com/support/webmasters/bin/answer.py?answer=146645) of what they use, but the full standard for the [hReview Microformat](http://microformats.org/wiki/hreview) shou... |
7,191 | <p>I have a blog (<a href="http://blog.brodzinski.com" rel="nofollow">http://blog.brodzinski.com</a>), which is wordpress.org blog with pretty popular Thesis theme with almost no other customizations. Some time ago it was penalized by Google search - it simply stopped appearing in search results even for search terms i... | [
{
"answer_id": 7192,
"author": "Chris Adragna",
"author_id": 3142,
"author_profile": "https://webmasters.stackexchange.com/users/3142",
"pm_score": 2,
"selected": false,
"text": "<p>Pawel, <strong>your site does seem to be suffering from a duplicate content penalty.</strong></p>\n\n<p>I ... | 2010/12/29 | [
"https://webmasters.stackexchange.com/questions/7191",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4159/"
] | I have a blog (<http://blog.brodzinski.com>), which is wordpress.org blog with pretty popular Thesis theme with almost no other customizations. Some time ago it was penalized by Google search - it simply stopped appearing in search results even for search terms it used to be top result, like my name - Pawel Brodzinski ... | Pawel, **your site does seem to be suffering from a duplicate content penalty.**
I did a quick Google search using quotes using a few different strings of text, each about 20+ words in length, each seemingly unique (i.e. not "spun" content, or database sourced).
**For example (Google query text):**
```
"So you manag... |
7,200 | <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements">How to find web hosting that meets my requirements?</a> </p>
</blockquote>
<p>Where can I find affordable web hosting for Codeigniter web app... | [
{
"answer_id": 7192,
"author": "Chris Adragna",
"author_id": 3142,
"author_profile": "https://webmasters.stackexchange.com/users/3142",
"pm_score": 2,
"selected": false,
"text": "<p>Pawel, <strong>your site does seem to be suffering from a duplicate content penalty.</strong></p>\n\n<p>I ... | 2010/12/30 | [
"https://webmasters.stackexchange.com/questions/7200",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4169/"
] | >
> **Possible Duplicate:**
>
> [How to find web hosting that meets my requirements?](https://webmasters.stackexchange.com/questions/20838/how-to-find-web-hosting-that-meets-my-requirements)
>
>
>
Where can I find affordable web hosting for Codeigniter web application? I need hosting that supports all the PHP ... | Pawel, **your site does seem to be suffering from a duplicate content penalty.**
I did a quick Google search using quotes using a few different strings of text, each about 20+ words in length, each seemingly unique (i.e. not "spun" content, or database sourced).
**For example (Google query text):**
```
"So you manag... |
7,288 | <p>not sure what stackexchange site is the best for this question.</p>
<p>I have a scanned jpg file with below properties and size 8.5MB</p>
<pre><code>pixel dimension: 2468 × 3484 pixels
print size: 208.96 × 294.98 millimeters
resolution: 300 × 300 ppi
</code></pre>
<p>I need to save the file as png (to have the pi... | [
{
"answer_id": 7289,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "<p>PNG is a lossless format, while JPEG is lossy. So its unlikely that saving as PNG will give you smaller file size.... | 2011/01/03 | [
"https://webmasters.stackexchange.com/questions/7288",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3860/"
] | not sure what stackexchange site is the best for this question.
I have a scanned jpg file with below properties and size 8.5MB
```
pixel dimension: 2468 × 3484 pixels
print size: 208.96 × 294.98 millimeters
resolution: 300 × 300 ppi
```
I need to save the file as png (to have the pic transparent) while the size can... | * Do not re-save as JPG (or do once as much, at hi quality). Every time you do it, you add new quality loss. Work in PNG format, and only if you need it, save last version as JPG.
* tweakPNG tool allows you to remove extra data, but beware not removing essential data(this is not a compressing tool). For compressing it ... |
7,405 | <p>I have organised my site by language using the following structure:</p>
<pre><code>www.domain.com #spanish language version homepage
www.domain.com/en #english language version homepage
</code></pre>
<p>The site is of Spanish subject matter hence Spanish language takes priority at root of domain. Although the s... | [
{
"answer_id": 7413,
"author": "amoks",
"author_id": 4404,
"author_profile": "https://webmasters.stackexchange.com/users/4404",
"pm_score": 2,
"selected": false,
"text": "<p>Yes, they do.</p>\n\n<p>Although each search engine is different, the obvious ones (Google, Bing) do use language ... | 2011/01/06 | [
"https://webmasters.stackexchange.com/questions/7405",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3610/"
] | I have organised my site by language using the following structure:
```
www.domain.com #spanish language version homepage
www.domain.com/en #english language version homepage
```
The site is of Spanish subject matter hence Spanish language takes priority at root of domain. Although the site is new at this stage I... | Declaring Language in XHTML and HTML
------------------------------------
The W3 describes how to formally declare the language of your web pages:
[http://www.w3.org/International/tutorials/language-decl/](http://www.w3.org/International/tutorials/language-decl/ "Declaring Language in XHTML and HTML")
Add a **conten... |
7,435 | <p>The access log on my web server has a ton of HTTP HEAD requests coming from porn sites.
What are HEAD requests and are they doing something bad with my site?</p>
<p>Here is an excerpt from my log:</p>
<p>(valid request)</p>
<pre>xxx.xxx.xxx.xxx - - [02/Jan/2011:23:42:25 -0800] "POST /ajax HTTP/1.1" 200 0 "http://... | [
{
"answer_id": 7436,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 3,
"selected": false,
"text": "<p>Most likely attempts at <a href=\"http://en.wikipedia.org/wiki/Referrer_spam\" rel=\"noreferrer\">referrer spa... | 2011/01/07 | [
"https://webmasters.stackexchange.com/questions/7435",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | The access log on my web server has a ton of HTTP HEAD requests coming from porn sites.
What are HEAD requests and are they doing something bad with my site?
Here is an excerpt from my log:
(valid request)
```
xxx.xxx.xxx.xxx - - [02/Jan/2011:23:42:25 -0800] "POST /ajax HTTP/1.1" 200 0 "http://www.mywebsite.com/abc.... | Most likely attempts at [referrer spam](http://en.wikipedia.org/wiki/Referrer_spam), but these could also be malicious (i.e. [remote file inclusion](http://en.wikipedia.org/wiki/Remote_file_inclusion) attempts or contact form spam - particularly if you're running software which could be identified as vulnerable).
If p... |
7,488 | <p>I am trying to make it easier for search engines to crawl my website, as it is almost 100% dynamic.</p>
<p>I have a couple of transparent images which are actually links to sections of my page.</p>
<p>I wonder, if I add an "alt" attribute containing space characters to explain the target, will this improve SE rank... | [
{
"answer_id": 7489,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>alt is not for search engines. alt is for text-to-speech browsers.</p>\n"
},
{
"answer_id": 7490,
"aut... | 2011/01/05 | [
"https://webmasters.stackexchange.com/questions/7488",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2312/"
] | I am trying to make it easier for search engines to crawl my website, as it is almost 100% dynamic.
I have a couple of transparent images which are actually links to sections of my page.
I wonder, if I add an "alt" attribute containing space characters to explain the target, will this improve SE rankings etc?
For ex... | You *should* use spaces, as screen readers will not be able to understand the tag otherwise.
Most modern browsers also use these as "tool tips" when hovering over images (if a `title` attribute is missing) - so, even on this count you should use proper grammar.
In general `alt` is an alternative representation of the... |
7,515 | <p>I read about <code><section></code> and <code><aside></code> on the WC3 site a whole ago, but I can't remember if an <code><aside></code> should be placed inside a <code><section></code> or directly beneath it. Does anybody know?</p>
<p>E.g. Should it be like this?:</p>
<pre><code><secti... | [
{
"answer_id": 7533,
"author": "Grant Palin",
"author_id": 132,
"author_profile": "https://webmasters.stackexchange.com/users/132",
"pm_score": 1,
"selected": false,
"text": "<p>To me it makes the most sense to have the aside within the section that it relates to, if that is the intent o... | 2011/01/09 | [
"https://webmasters.stackexchange.com/questions/7515",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1363/"
] | I read about `<section>` and `<aside>` on the WC3 site a whole ago, but I can't remember if an `<aside>` should be placed inside a `<section>` or directly beneath it. Does anybody know?
E.g. Should it be like this?:
```
<section>...</section>
```
Or like this:
```
<section>...<aside>...</aside>...</section>
```
... | You can place an *aside* inside *section* if you like. It just indicates that the content is not directly related to the current article hence it being aside. Moreover, you can even have a *section* inside a *aside* tag if you want to break up the content within it.
I usually think of *aside* as having more of a sema... |
7,518 | <p>I'm looking to convert a site from Flash based video to HTML5, the current video uses time marks to display slides (kind of like how youtube has ads on their videos). But the difference between Youtube and my site is that it doesn't show up inside the video, the slides are displayed next to the video.</p>
<p>Is the... | [
{
"answer_id": 7558,
"author": "Steve",
"author_id": 304,
"author_profile": "https://webmasters.stackexchange.com/users/304",
"pm_score": 0,
"selected": false,
"text": "<p>Yes, you would need JavaScript to implement the slides feature you've described, HTML5 is just markup; you can embed... | 2011/01/09 | [
"https://webmasters.stackexchange.com/questions/7518",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2087/"
] | I'm looking to convert a site from Flash based video to HTML5, the current video uses time marks to display slides (kind of like how youtube has ads on their videos). But the difference between Youtube and my site is that it doesn't show up inside the video, the slides are displayed next to the video.
Is there any way... | You'll need JavaScript.
The good news is that it's pretty easy. Just use the [jPlayer](http://jplayer.org/) video player for video playback, then bind the `$.jPlayer.event.timeupdate` event to advance your slideshow:
```
<!doctype html>
<html>
<head>
<title>Demo : jPlayer as a slide player</title>
<link href="skin/j... |
7,645 | <p>I have a huge list of IP addresses recorded from various visitors to a website. A huge amount of the visitors, in some months over 70%, came from IP addresses that contained keywords such as google, yahoo, bot, crawler, etc.</p>
<p>Does this mean that those users were infact search engine crawlers?</p>
<p>If so, why... | [
{
"answer_id": 7646,
"author": "Mike Scott",
"author_id": 4311,
"author_profile": "https://webmasters.stackexchange.com/users/4311",
"pm_score": 3,
"selected": true,
"text": "<p>That looks genuine, as it's fairly hard to spoof a source domain name -- crawlers can generate a lot of traffi... | 2011/01/11 | [
"https://webmasters.stackexchange.com/questions/7645",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2455/"
] | I have a huge list of IP addresses recorded from various visitors to a website. A huge amount of the visitors, in some months over 70%, came from IP addresses that contained keywords such as google, yahoo, bot, crawler, etc.
Does this mean that those users were infact search engine crawlers?
If so, why are their so m... | That looks genuine, as it's fairly hard to spoof a source domain name -- crawlers can generate a lot of traffic. They often check pages for changes quite frequently.
You can slow down many of them with a non-standard (but fairly well supported) addition to the [Robots Exclusion Protocol](http://www.robotstxt.org/) -- ... |
7,647 | <p>Does any one here recommend online services where I can have my PSD (or other image format) design sent and they give me the HTML+CSS of it?</p>
<p>I saw a few of those on the internet, but I am looking for tried-and-tested services, and to see if there are any of those that you guys recommend me to stay away from.... | [
{
"answer_id": 7646,
"author": "Mike Scott",
"author_id": 4311,
"author_profile": "https://webmasters.stackexchange.com/users/4311",
"pm_score": 3,
"selected": true,
"text": "<p>That looks genuine, as it's fairly hard to spoof a source domain name -- crawlers can generate a lot of traffi... | 2011/01/11 | [
"https://webmasters.stackexchange.com/questions/7647",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4550/"
] | Does any one here recommend online services where I can have my PSD (or other image format) design sent and they give me the HTML+CSS of it?
I saw a few of those on the internet, but I am looking for tried-and-tested services, and to see if there are any of those that you guys recommend me to stay away from. | That looks genuine, as it's fairly hard to spoof a source domain name -- crawlers can generate a lot of traffic. They often check pages for changes quite frequently.
You can slow down many of them with a non-standard (but fairly well supported) addition to the [Robots Exclusion Protocol](http://www.robotstxt.org/) -- ... |
7,694 | <p>My concern is about SEO. Now let me explain the scenario.</p>
<p>I am making a 3 languages website. The development is alright, but I was targeting local customers with one domain, and international (English version) with another. Eg:</p>
<p>Local
<code>http://www.minhalojadesapatos.com.br</code> (this is not the ... | [
{
"answer_id": 7696,
"author": "andrewk",
"author_id": 3707,
"author_profile": "https://webmasters.stackexchange.com/users/3707",
"pm_score": 0,
"selected": false,
"text": "<p>Actually you will be fine. You won't get penalized for that. It's a different language. Just make sure each site... | 2011/01/12 | [
"https://webmasters.stackexchange.com/questions/7694",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2293/"
] | My concern is about SEO. Now let me explain the scenario.
I am making a 3 languages website. The development is alright, but I was targeting local customers with one domain, and international (English version) with another. Eg:
Local
`http://www.minhalojadesapatos.com.br` (this is not the real website, just example!)... | Picking up an old question, because it's still relevant and common :-) ...
In general, you won't be "penalized" for anything like this, provided you use real translations and don't use automatic translations to create other versions of your content. The thing that's important for search engines is that you have unique... |
7,698 | <p>I try to add simple Like button to my Facebook Canvas app (iframe). The button (and all other XFBML elements) works in Safari, Firefox, Opera, but in Google Chrome. </p>
<p>How can I find the problem?</p>
<p>EDIT1:</p>
<p>This is ERB-layout in my Rails app</p>
<pre><code><html xmlns:fb='http://www.facebook.co... | [
{
"answer_id": 7700,
"author": "andrewk",
"author_id": 3707,
"author_profile": "https://webmasters.stackexchange.com/users/3707",
"pm_score": 3,
"selected": true,
"text": "<p>I'm doing exaclty what you are doing. And it works. Try this snippet.</p>\n\n<pre><code><div id=\"fb-root\">... | 2011/01/12 | [
"https://webmasters.stackexchange.com/questions/7698",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4574/"
] | I try to add simple Like button to my Facebook Canvas app (iframe). The button (and all other XFBML elements) works in Safari, Firefox, Opera, but in Google Chrome.
How can I find the problem?
EDIT1:
This is ERB-layout in my Rails app
```
<html xmlns:fb='http://www.facebook.com/2008/fbml' xmlns='http://www.w3.org/... | I'm doing exaclty what you are doing. And it works. Try this snippet.
```
<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({appId: '<%= @app_id %>', status: true, cookie: true, xfbml: true});
FB.Event.subscribe('auth.sessionChange', function(response) {... |
7,705 | <p>All the examples of accessing google's CDN use https:// in the URL (including on Google itself) - but this has caused a problem when testing in Safari (certificate problem and also different domain).</p>
<pre><code><script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.... | [
{
"answer_id": 7706,
"author": "andrewk",
"author_id": 3707,
"author_profile": "https://webmasters.stackexchange.com/users/3707",
"pm_score": 0,
"selected": false,
"text": "<p>You will see errors and warnings when you are including \"unsecure\" items on a secure page. (Vice versa) This i... | 2011/01/13 | [
"https://webmasters.stackexchange.com/questions/7705",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3171/"
] | All the examples of accessing google's CDN use https:// in the URL (including on Google itself) - but this has caused a problem when testing in Safari (certificate problem and also different domain).
```
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
``... | You should probably just use `src="//ajax.googleapis.com/..."` which is a good way to allow this to work in both http and https pages.
Serving http assets in a page served via https will raise warnings in most browsers, while serving https assets in http pages usually is okay but might be "slower" because of the crypt... |
7,729 | <p>OK, so this seems like a really simply problem, but I have yet to find a solution that accomplishes the following:</p>
<ol>
<li>Opens the link in a new window</li>
<li>Tracks the event in GA (obviously)</li>
<li>Doesn't trigger pop-up blockers (uses target="_blank" instead of window.open)</li>
</ol>
<p>Most of the... | [
{
"answer_id": 9149,
"author": "Hissohathair",
"author_id": 5382,
"author_profile": "https://webmasters.stackexchange.com/users/5382",
"pm_score": 1,
"selected": false,
"text": "<p>I might have misunderstood... does this not work?</p>\n\n<pre><code><a href=\"/path/to/page\" target=\"_... | 2011/01/13 | [
"https://webmasters.stackexchange.com/questions/7729",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2756/"
] | OK, so this seems like a really simply problem, but I have yet to find a solution that accomplishes the following:
1. Opens the link in a new window
2. Tracks the event in GA (obviously)
3. Doesn't trigger pop-up blockers (uses target="\_blank" instead of window.open)
Most of the code I've seen, including Google's, d... | I might have misunderstood... does this not work?
```
<a href="/path/to/page" target="_blank" onClick="javascript: pageTracker._trackPageview('/path/to/page');">
``` |
7,737 | <p>My client has asked me to implement a browser detection system for the admin login with the following criteria, allow these:</p>
<ul>
<li>Internet Explorer 8 or newer</li>
<li>Firefox 3.6 or newer</li>
<li>Safari 5 or newer for Mac only</li>
</ul>
<p>And everything else should be blocked. They want me to implement... | [
{
"answer_id": 7738,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 1,
"selected": false,
"text": "<p><s><code>$_SERVER['HTTP_USER_AGENT']</code> contains the string you seek - how you parse it is up to you... <a... | 2011/01/14 | [
"https://webmasters.stackexchange.com/questions/7737",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/2986/"
] | My client has asked me to implement a browser detection system for the admin login with the following criteria, allow these:
* Internet Explorer 8 or newer
* Firefox 3.6 or newer
* Safari 5 or newer for Mac only
And everything else should be blocked. They want me to implement a page telling the user what browser they... | The unique way I know to do that on server side is to analyze the User Agent HTTP Header.
I know that using the get\_browser function may be useful, or may be a pain in the a\*\*. Because it depends on external files that can be outdated.
The safe solution? None actually, but you can shortcut the browscap.ini file lo... |
8,005 | <pre><code><div id="papers" NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
content -- Does this work to block search engines to crawl me?
</div>
</code></pre>
| [
{
"answer_id": 8006,
"author": "Just Jake",
"author_id": 4750,
"author_profile": "https://webmasters.stackexchange.com/users/4750",
"pm_score": 3,
"selected": true,
"text": "<p>The age-old standard for managing robots is <a href=\"http://www.robotstxt.org/\" rel=\"nofollow\">/robots.txt<... | 2011/01/20 | [
"https://webmasters.stackexchange.com/questions/8005",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | ```
<div id="papers" NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
content -- Does this work to block search engines to crawl me?
</div>
``` | The age-old standard for managing robots is [/robots.txt](http://www.robotstxt.org/). `robots.txt` *asks* robots not to crawl or index certain pages on your site. Your specific question seems to relate more to the [Robots `<META>` tag](http://www.robotstxt.org/meta.html), which belongs in the `<head>` of your document,... |
8,055 | <p>I have the following HTML and css</p>
<pre><code><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#test
{
font-family:helvetica;
color:#000;
font-size:10px;
}
</style>
</head>
<body>
<input type="password" id="test" name="pass" size="30" max=... | [
{
"answer_id": 8068,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 0,
"selected": false,
"text": "<p>Unable to duplicate in IE 8.0.6001.18702 build 86001.</p>\n\n<p>Check your character encoding settings in IE (... | 2011/01/21 | [
"https://webmasters.stackexchange.com/questions/8055",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4784/"
] | I have the following HTML and css
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style type="text/css">
#test
{
font-family:helvetica;
color:#000;
font-size:10px;
}
</style>
</head>
<body>
<input type="password" id="test" name="pass" size="30" max="100">
</body>
</html>
```
When I open it up in Fir... | Your version of Helvetica either doesn't have the bullet character and is defaulting to the funny rectangle, or it just has a bad idea of what a bullet point should look like. You'll see it a lot with "freeware" fonts, but I wouldn't imagine Helvetica to skip characters unless it's a knock-off version.
If you're on Wi... |
8,065 | <p>I am trying to figure out how to create dynamic links and URLs for a static webpage. What I want to do is the following. I have a single webpage for example:</p>
<pre><code>http://example.com/INDEX.HTML
</code></pre>
<p>that will always look the same, except for one link on the page.
the link would be on the page ... | [
{
"answer_id": 8066,
"author": "Richard Testani",
"author_id": 4793,
"author_profile": "https://webmasters.stackexchange.com/users/4793",
"pm_score": 1,
"selected": false,
"text": "<p>The referrer in PHP is in the _SERVER global.</p>\n\n<pre><code>echo $_SERVER['HTTP_REFERER'];\n</code><... | 2011/01/21 | [
"https://webmasters.stackexchange.com/questions/8065",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I am trying to figure out how to create dynamic links and URLs for a static webpage. What I want to do is the following. I have a single webpage for example:
```
http://example.com/INDEX.HTML
```
that will always look the same, except for one link on the page.
the link would be on the page for example: LINK TO AFFIL... | Since your index is PHP, all you need is to modify the link using PHP.
So, in your index.php between the HTML you would have something like:
```
<a href="affiliate.com/my_affiliate_code_here_<?php echo $_GET['id']; ?>">Link Text</a>
```
So, when someone goes to:
index.php?id=test1
The link would go to affiliate.co... |
8,076 | <p>looking through Google's Webmaster Tools today I saw a long list of supposedly duplicate <code><meta name=description></code> / <code><title></code> tag content with all of them showing a duplicate count of 2. A lot of them show as the conflicting URLs something like the following:</p>
<pre><code>/deuts... | [
{
"answer_id": 8077,
"author": "Fabian",
"author_id": 4798,
"author_profile": "https://webmasters.stackexchange.com/users/4798",
"pm_score": 4,
"selected": true,
"text": "<p>Specify the canonical URL.</p>\n\n<p><link rel=\"canonical\" href=\"/deutschland/Bayern/Camping-Allweglehen-190... | 2011/01/22 | [
"https://webmasters.stackexchange.com/questions/8076",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1714/"
] | looking through Google's Webmaster Tools today I saw a long list of supposedly duplicate `<meta name=description>` / `<title>` tag content with all of them showing a duplicate count of 2. A lot of them show as the conflicting URLs something like the following:
```
/deutschland/Bayern/Camping-Allweglehen-19062
/deutsch... | Specify the canonical URL.
<link rel="canonical" href="/deutschland/Bayern/Camping-Allweglehen-19062"> |
8,114 | <p>the following virtual host definition is working for an arbitrary url starting with "http://1.2.3.4:80/*"</p>
<pre><code><VirtualHost *:80>
ServerName www.domain.com
DocumentRoot /home/user/www/application/current/public
<Directory /home/user/www/application/current/public>
Order... | [
{
"answer_id": 8115,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>I'm sorry to say I can't answer your question directly but I am fascinated by it. I've been doing Apache support o... | 2011/01/22 | [
"https://webmasters.stackexchange.com/questions/8114",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | the following virtual host definition is working for an arbitrary url starting with "http://1.2.3.4:80/\*"
```
<VirtualHost *:80>
ServerName www.domain.com
DocumentRoot /home/user/www/application/current/public
<Directory /home/user/www/application/current/public>
Order allow,deny
Allo... | Unfortunately, `ServerPath` is a legacy directive that is used to support HTTP/1.0 clients which don't support the `Host:` header. Therefore, an alternative is to have the primary vhost [serve up a page with links using URL prefixes that Apache can use for routing](http://httpd.apache.org/docs/1.3/vhosts/examples.html#... |
8,139 | <p>I have my homepage html file, lets call it home.html</p>
<p>Technically, to get to that file, my user would need to go to www.example.com/home.html no?</p>
<p>How do I do it so www.example.com automatically runs home.html without any redirections?</p>
| [
{
"answer_id": 8143,
"author": "Shaun",
"author_id": 4629,
"author_profile": "https://webmasters.stackexchange.com/users/4629",
"pm_score": 2,
"selected": false,
"text": "<p>If you are using <strong>Apache</strong>, naming your homepage file 'index.html' will get it to be detected at www... | 2011/01/24 | [
"https://webmasters.stackexchange.com/questions/8139",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I have my homepage html file, lets call it home.html
Technically, to get to that file, my user would need to go to www.example.com/home.html no?
How do I do it so www.example.com automatically runs home.html without any redirections? | If you are using **Apache**, naming your homepage file 'index.html' will get it to be detected at www.example.com by default. If you want to change it to accept home.html as a valid directory index page, you will need to edit the `DirectoryIndex` directive in your configuration file:
```
DirectoryIndex index.html home... |
8,172 | <p>We currently have Analytics tracking codes running throughout our site including our Sub Domains.</p>
<p>What I would like to do is create different Profiles under the same account segmenting the sub domains by means of filters.</p>
<p>Currently I am just excluding the hostname of the main website by using the fol... | [
{
"answer_id": 8253,
"author": "Schneid",
"author_id": 4897,
"author_profile": "https://webmasters.stackexchange.com/users/4897",
"pm_score": 1,
"selected": false,
"text": "<p>Try this: <a href=\"http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#multipleDomains\" re... | 2011/01/24 | [
"https://webmasters.stackexchange.com/questions/8172",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | We currently have Analytics tracking codes running throughout our site including our Sub Domains.
What I would like to do is create different Profiles under the same account segmenting the sub domains by means of filters.
Currently I am just excluding the hostname of the main website by using the following custom fil... | Try this: <http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#multipleDomains>
Where you would modify
```
_gaq.push(['_setDomainName', '.example-petstore.com']);
```
to
```
_gaq.push(['_setDomainName', '.mydomain.co.za']);
```
The profile for each subsite could us a custom filter on hostnam... |
8,174 | <p>I got a quick question and would love to know your opinion.
I develop a CMS that in it's large part is very SEO-centric with many features that allow to control various individual parts of a web page.</p>
<p>For example a web page can have a nice slug (url alias), page title override (other than content title in t... | [
{
"answer_id": 8253,
"author": "Schneid",
"author_id": 4897,
"author_profile": "https://webmasters.stackexchange.com/users/4897",
"pm_score": 1,
"selected": false,
"text": "<p>Try this: <a href=\"http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#multipleDomains\" re... | 2011/01/24 | [
"https://webmasters.stackexchange.com/questions/8174",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4785/"
] | I got a quick question and would love to know your opinion.
I develop a CMS that in it's large part is very SEO-centric with many features that allow to control various individual parts of a web page.
For example a web page can have a nice slug (url alias), page title override (other than content title in the CMS), t... | Try this: <http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html#multipleDomains>
Where you would modify
```
_gaq.push(['_setDomainName', '.example-petstore.com']);
```
to
```
_gaq.push(['_setDomainName', '.mydomain.co.za']);
```
The profile for each subsite could us a custom filter on hostnam... |
8,192 | <p>I'm not so good at DNS at all but I do know some basics.</p>
<p>A while ago i have noticed, that my blog have different Page Ranks, PR 3 for domain <code>www.example.com</code> and PR 1 for domain <code>example.com</code>.</p>
<p>In dns records i have this setup:</p>
<pre><code>A - IP - `www.example.com`
A - same... | [
{
"answer_id": 8193,
"author": "JamesRyan",
"author_id": 3310,
"author_profile": "https://webmasters.stackexchange.com/users/3310",
"pm_score": 1,
"selected": false,
"text": "<p>You need to set a 301 redirect on one of your domains to point to the other one.</p>\n"
},
{
"answer_i... | 2011/01/24 | [
"https://webmasters.stackexchange.com/questions/8192",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/6537/"
] | I'm not so good at DNS at all but I do know some basics.
A while ago i have noticed, that my blog have different Page Ranks, PR 3 for domain `www.example.com` and PR 1 for domain `example.com`.
In dns records i have this setup:
```
A - IP - `www.example.com`
A - same IP - `example.com`
```
Should i replace this re... | You need to set a 301 redirect on one of your domains to point to the other one. |
8,220 | <p>Anyone able to help me with MediaWiki Tables?</p>
<p>I've created a table in my companies Wiki (using mediawiki 1.13.4) which I can't for the life of me get to sort correctly. It will sort on the first two columns, but any column after that the sort doesn't happen.</p>
<p>Here's the Wiki Markup i'm using (note I'm... | [
{
"answer_id": 8269,
"author": "udo",
"author_id": 4828,
"author_profile": "https://webmasters.stackexchange.com/users/4828",
"pm_score": 0,
"selected": false,
"text": "<p>maybe you intended to do this:</p>\n\n<pre><code>{| border=\"1\" class=\"wikitable sortable\" style=\"text-align:cen... | 2011/01/24 | [
"https://webmasters.stackexchange.com/questions/8220",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/4304/"
] | Anyone able to help me with MediaWiki Tables?
I've created a table in my companies Wiki (using mediawiki 1.13.4) which I can't for the life of me get to sort correctly. It will sort on the first two columns, but any column after that the sort doesn't happen.
Here's the Wiki Markup i'm using (note I'm using templates ... | OK, I've done some more research into this and it seems it's actually a bug in the version of MediaWiki my company are running (v1.13.4). It has however been fixed in later versions.
Now to see if I can get them to allow me to update the software.
Sorry guys, and thanks for your efforts! |
8,320 | <p>Here is my site: <a href="http://dosrevival.com" rel="nofollow">http://dosrevival.com</a></p>
<p>I can't seem to get the links to stop turning purple after being clicked in Chrome and IE (works in some Firefox versions?!?). In my CSS file I'm changing the a:link and a:hover 'color' to white and the 'text-decoration... | [
{
"answer_id": 8322,
"author": "Chase Florell",
"author_id": 4943,
"author_profile": "https://webmasters.stackexchange.com/users/4943",
"pm_score": 2,
"selected": false,
"text": "<p>Check out this link<br>\n<a href=\"http://blogs.x2line.com/al/articles/159.aspx\" rel=\"nofollow\">http://... | 2011/01/27 | [
"https://webmasters.stackexchange.com/questions/8320",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | Here is my site: <http://dosrevival.com>
I can't seem to get the links to stop turning purple after being clicked in Chrome and IE (works in some Firefox versions?!?). In my CSS file I'm changing the a:link and a:hover 'color' to white and the 'text-decoration' to none or underlined as necessary. What's making Chrome ... | Check out this link
<http://blogs.x2line.com/al/articles/159.aspx>
Basically you need something along these lines
```
a:link { color:red; }
a:visited { color:green; }
a:hover { color:blue; }
a:active { color:orange; }
```
Notice that I didn't put purple in there. You... |
8,332 | <p>Lets say I have a website where users are allowed to upload files which will be displayed publicly as a portfolio gallery. For example, users might upload screenshots of a website they designed, or a MS Word document of some PR example text, or a PDF of their CV, etc.</p>
<p>Some files will be blacklisted for secur... | [
{
"answer_id": 8336,
"author": "MrG",
"author_id": 1089,
"author_profile": "https://webmasters.stackexchange.com/users/1089",
"pm_score": 1,
"selected": false,
"text": "<p>I would say yes there are security considerations of allowing users to upload flash files.</p>\n\n<p>The security is... | 2011/01/27 | [
"https://webmasters.stackexchange.com/questions/8332",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/500/"
] | Lets say I have a website where users are allowed to upload files which will be displayed publicly as a portfolio gallery. For example, users might upload screenshots of a website they designed, or a MS Word document of some PR example text, or a PDF of their CV, etc.
Some files will be blacklisted for security reason... | I do know flash and yes this is a terrible idea! This is what started all the trouble for myspace with self replicating virus worms. It's really simple, with flash I can get your browser to make all sorts of calls/connections/login to sites/post things as you/etc. It's amazing how much you can pull off a user with flas... |
8,486 | <p>I want a nice hangul font. Can somebody indicate one ? Something elegant and beautiful like this England calligraphy:</p>
<p><img src="https://i.stack.imgur.com/JmIWA.png" alt="Calligraphy"></p>
<p>I would like to apply it using css 3:</p>
<pre><code><!DOCTYPE html>
<html>
<head>
&l... | [
{
"answer_id": 8498,
"author": "Keith Groben",
"author_id": 4945,
"author_profile": "https://webmasters.stackexchange.com/users/4945",
"pm_score": 0,
"selected": false,
"text": "<p>There are plenty of free fonts on the web. Rather then listing the web sites for you, I would suggest searc... | 2011/01/30 | [
"https://webmasters.stackexchange.com/questions/8486",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I want a nice hangul font. Can somebody indicate one ? Something elegant and beautiful like this England calligraphy:

I would like to apply it using css 3:
```
<!DOCTYPE html>
<html>
<head>
<meta charset = "utf-8">
<style>
@font-fa... | Please remember when using TTF's that not all browsers support it. Internet Explorer, while it does support the CSS3 @Font-face attribute, but it will only use .eot fonts.
From experience, if I have a TTF font and I want to convert this to EOT and SVG font files, the quality will be compromised. It will appear blocky ... |
8,525 | <p>Web browsers provide a JavaScript console as part of their developer tools. This console is useful for the following reasons:</p>
<ul>
<li>Errors and warnings that occur on a web page are logged into the console.</li>
<li>JavaScript commands for interacting with a web page can be executed in the console.</li>
</ul>... | [
{
"answer_id": 8555,
"author": "mvark",
"author_id": 576,
"author_profile": "https://webmasters.stackexchange.com/users/576",
"pm_score": 4,
"selected": false,
"text": "<p>To <em>indirectly</em> reach the Console in Opera (checked on v9.6) the shortcut is <kbd>Ctrl</kbd>+<kbd>Shift</kbd>... | 2011/01/31 | [
"https://webmasters.stackexchange.com/questions/8525",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3382/"
] | Web browsers provide a JavaScript console as part of their developer tools. This console is useful for the following reasons:
* Errors and warnings that occur on a web page are logged into the console.
* JavaScript commands for interacting with a web page can be executed in the console.
What are the keyboard shortcut... | Chrome
======
Opening the “Console” panel of Chrome’s **DevTools**:
* Windows and Linux: `Ctrl` + `Shift` + `J`
* Mac OS: `Cmd` + `Opt` + `J`
*Note: In addition to the “Console” panel, there also exists a smaller slide-up console which can be toggled via `Esc` while any of the other panels is active.*
[Full docume... |
8,530 | <p>On my server (over which I have little control), directories are listed by default, so for <code>mysite.com/images</code> I get:</p>
<blockquote>
<p><strong>Index of /images</strong></p>
<p>Parent Directory<br>
BirdsAreHere.png<br>
CanYouSpot-AdBlank.jpg </p>
</blockquote>
<p>etc. Is putting an index.h... | [
{
"answer_id": 8534,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 3,
"selected": true,
"text": "<p>Putting an index.html file should solve that problem. But if you really want to be sure no one gets the direct... | 2011/02/01 | [
"https://webmasters.stackexchange.com/questions/8530",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5052/"
] | On my server (over which I have little control), directories are listed by default, so for `mysite.com/images` I get:
>
> **Index of /images**
>
>
> Parent Directory
>
> BirdsAreHere.png
>
> CanYouSpot-AdBlank.jpg
>
>
>
etc. Is putting an index.html in that directory enough to prevent people listing th... | Putting an index.html file should solve that problem. But if you really want to be sure no one gets the directory list just place an .htaccess file in the root of your www directory with this line in it:
```
Options -Indexes
```
That will prevent Apache from listing the files of your directories. |
8,577 | <p>It's my understanding (based from this chapter of Dive into HTML5: <a href="http://goo.gl/9zliD">http://goo.gl/9zliD</a>) that it can be considered semantically appropriate to use H1 tags in multiple areas of the page, as a method of setting the most important title for that particular content.</p>
<p><strong>If I'... | [
{
"answer_id": 8587,
"author": "Richard Testani",
"author_id": 4793,
"author_profile": "https://webmasters.stackexchange.com/users/4793",
"pm_score": 0,
"selected": false,
"text": "<p>While the article titles of your page are important, generally the top level heading of the page defines... | 2011/02/01 | [
"https://webmasters.stackexchange.com/questions/8577",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5083/"
] | It's my understanding (based from this chapter of Dive into HTML5: <http://goo.gl/9zliD>) that it can be considered semantically appropriate to use H1 tags in multiple areas of the page, as a method of setting the most important title for that particular content.
**If I'm using this methodology, and I have a SECTION w... | Pilgrim isn't alone in contending this.
According to Jeremy Keith's [HTML5 for Web Designers](http://www.amazon.com/s?ie=UTF8&keywords=HTML5%20for%20Web%20Designers&rh=n:283155,k%3aHTML5%20for%20Web%20Designers&page=1), you can use multiple `<h1>`s in a document without ruining the document summary, as long as they ar... |
8,578 | <p>I frequently receive mock-ups of HTML forms with the following prototype:</p>
<p>Some long winded yes or no question? (o) Yes ( ) No</p>
<p>The <code>(o)</code> and <code>( )</code> in this prototype represent radio buttons. My personal view is that if the question has only a true or false value then... | [
{
"answer_id": 8582,
"author": "Bevan",
"author_id": 767,
"author_profile": "https://webmasters.stackexchange.com/users/767",
"pm_score": 2,
"selected": false,
"text": "<p>I disagree with both of the approaches. </p>\n\n<p>Mostly, if the \"long winded question\" really does have two answ... | 2011/02/01 | [
"https://webmasters.stackexchange.com/questions/8578",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1847/"
] | I frequently receive mock-ups of HTML forms with the following prototype:
Some long winded yes or no question? (o) Yes ( ) No
The `(o)` and `( )` in this prototype represent radio buttons. My personal view is that if the question has only a true or false value then it should be a check box. That said, I have seen... | While your checkbox idea is much more efficient, I think you would have to avoid stating it as a question for it to make sense. For instance:
```
<label for="the_question">I would answer yes to this long winded question.</label>
<input type="checkbox" name="the_question" id="the_question" value="1">
```
However, if ... |
8,580 | <p>I want to make a website in two languages. I've looked around and settled on the directory option of separating both languages. How do I make it work? </p>
<p>Let's say I have the following three files for the landing homepage, the English page and the Spanish page:</p>
<pre><code>http://www.domain.com/index.html
... | [
{
"answer_id": 8626,
"author": "Eric Petroelje",
"author_id": 343,
"author_profile": "https://webmasters.stackexchange.com/users/343",
"pm_score": 3,
"selected": true,
"text": "<p>I think you are on the right track here. There are a few ways I've seen this done:</p>\n\n<ol>\n<li><p>Have... | 2011/02/01 | [
"https://webmasters.stackexchange.com/questions/8580",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5084/"
] | I want to make a website in two languages. I've looked around and settled on the directory option of separating both languages. How do I make it work?
Let's say I have the following three files for the landing homepage, the English page and the Spanish page:
```
http://www.domain.com/index.html
http://www.domain.com... | I think you are on the right track here. There are a few ways I've seen this done:
1. Have the `www.domain.com/index.html` page be a simple language selection page with only links to the `en` and `es` home pages. Personally I find this annoying, but I still see it all the time.
2. Just sent everyone to the english ver... |
8,593 | <p>I have created a new domain and uploaded index.html to public directory. but it isnt displaying and cpanel default page is displaying instead. how can I change the same??</p>
| [
{
"answer_id": 8661,
"author": "Adam Beizsley-Pycroft",
"author_id": 5131,
"author_profile": "https://webmasters.stackexchange.com/users/5131",
"pm_score": 0,
"selected": false,
"text": "<p>I believe this is down to permissions. Try CHMODing your files to 755. </p>\n"
},
{
"answe... | 2011/02/02 | [
"https://webmasters.stackexchange.com/questions/8593",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I have created a new domain and uploaded index.html to public directory. but it isnt displaying and cpanel default page is displaying instead. how can I change the same?? | Try putting this in the .htaccess file in your root web directory:
```
DirectoryIndex index.html index.php
``` |
8,604 | <p>Is it possible to get rounded corners in IE8 using only CSS? If so, how?</p>
| [
{
"answer_id": 8607,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>Unfortunately, it's not possible using only CSS.</p>\n\n<p>Here's <a href=\"http://msdn.microsoft.com/en-us/librar... | 2011/02/02 | [
"https://webmasters.stackexchange.com/questions/8604",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | Is it possible to get rounded corners in IE8 using only CSS? If so, how? | I know of one simple solution to use; the JavaScript JQuery plugin JQuery Corners.
All you have to do is link JQuery and the plugin using an external script reference, then add this code:
```
$("[SELECTOR]").corner();
```
[JQuery](http://www.jquery.com)
[JQuery How-To](http://docs.jquery.com/How_jQuery_Works) (In c... |
8,613 | <p>I have a simple setup.</p>
<ol>
<li>Server at home has local I.P. 192.168.1.3</li>
<li>IIS is running on the server and the website is up.</li>
<li>Windows firewall on the server has an exception rule for port 80 TCP</li>
<li>Router has static I.P. XX.XXX.XX.XXX</li>
<li>Router is forwarding TCP port 80 to 192.168.... | [
{
"answer_id": 8607,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>Unfortunately, it's not possible using only CSS.</p>\n\n<p>Here's <a href=\"http://msdn.microsoft.com/en-us/librar... | 2011/02/01 | [
"https://webmasters.stackexchange.com/questions/8613",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5080/"
] | I have a simple setup.
1. Server at home has local I.P. 192.168.1.3
2. IIS is running on the server and the website is up.
3. Windows firewall on the server has an exception rule for port 80 TCP
4. Router has static I.P. XX.XXX.XX.XXX
5. Router is forwarding TCP port 80 to 192.168.1.3
6. My domain registrar is my DNS ... | I know of one simple solution to use; the JavaScript JQuery plugin JQuery Corners.
All you have to do is link JQuery and the plugin using an external script reference, then add this code:
```
$("[SELECTOR]").corner();
```
[JQuery](http://www.jquery.com)
[JQuery How-To](http://docs.jquery.com/How_jQuery_Works) (In c... |
8,618 | <p>I am currently using a rewrite rule to enable access to .php pages, without using the php extension. However to prevent old links from breaking, the pages can still be accessed via links containing the .php extension too. </p>
<p>For eg.</p>
<p><code>domain.com/page.php</code> can now be accessed at <code>domain.c... | [
{
"answer_id": 8607,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>Unfortunately, it's not possible using only CSS.</p>\n\n<p>Here's <a href=\"http://msdn.microsoft.com/en-us/librar... | 2011/02/02 | [
"https://webmasters.stackexchange.com/questions/8618",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/1597/"
] | I am currently using a rewrite rule to enable access to .php pages, without using the php extension. However to prevent old links from breaking, the pages can still be accessed via links containing the .php extension too.
For eg.
`domain.com/page.php` can now be accessed at `domain.com/page`
All the links on the we... | I know of one simple solution to use; the JavaScript JQuery plugin JQuery Corners.
All you have to do is link JQuery and the plugin using an external script reference, then add this code:
```
$("[SELECTOR]").corner();
```
[JQuery](http://www.jquery.com)
[JQuery How-To](http://docs.jquery.com/How_jQuery_Works) (In c... |
8,637 | <p>I'm setting up a <code>mod_rewrite</code> rule that redirects failing pages to a custom "Page Not Found" page. This is with WordPress. I've used an online tutorial from the Apache site and so far my rules look like this:</p>
<pre><code>RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) http://example.com/?... | [
{
"answer_id": 8638,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>Very strange. In FF you can use <a href=\"http://getfirebug.com/\" rel=\"nofollow\">Firebug</a> or <a href=\"https... | 2011/02/02 | [
"https://webmasters.stackexchange.com/questions/8637",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5876/"
] | I'm setting up a `mod_rewrite` rule that redirects failing pages to a custom "Page Not Found" page. This is with WordPress. I've used an online tutorial from the Apache site and so far my rules look like this:
```
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.+) http://example.com/?page_id=254 [R]
```
Thi... | For setting custom 404s, you should be able to do that much easier (even in .htaccess), like so:
```
ErrorDocument 404 http://example.com/?page_id=254
```
See also: [ErrorDocument](http://httpd.apache.org/docs/2.0/mod/core.html#errordocument)
Less messy and significantly less CPU use per request than mod\_rewrite -... |
8,686 | <p>How can you change the color of a link within Google Sites when the mouse hovers over the link?</p>
| [
{
"answer_id": 14410,
"author": "Shane Hudson",
"author_id": 7822,
"author_profile": "https://webmasters.stackexchange.com/users/7822",
"pm_score": 2,
"selected": false,
"text": "<p>Although I have not used Google Sites, I believe the problem you are having is that it does not let you ad... | 2011/02/03 | [
"https://webmasters.stackexchange.com/questions/8686",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3081/"
] | How can you change the color of a link within Google Sites when the mouse hovers over the link? | Although I have not used Google Sites, I believe the problem you are having is that it does not let you add custom CSS?
Having checked Google and finding a "[CSS Workaround](http://www.google.com/support/forum/p/sites/thread?tid=6f5423cf1633135d&hl=en)" I see that while you cannot add custom CSS, you can add custom HT... |
8,708 | <p>We have a number of custom variables set up in google analytics. We'd like to show a table of event occurrences broken down by two custom variables, e.g. if variable one can be A, B, or C and variable two can be J, K or L:</p>
<pre><code>Events | A | B | C |
-------+-----+-----+-----+
J | 345 | 65 | 1... | [
{
"answer_id": 8711,
"author": "Christopher",
"author_id": 4803,
"author_profile": "https://webmasters.stackexchange.com/users/4803",
"pm_score": 2,
"selected": false,
"text": "<p>I'm going to assume you want this on your webpage.</p>\n\n<p>Set up your webpage by following the tutorial h... | 2011/02/04 | [
"https://webmasters.stackexchange.com/questions/8708",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5163/"
] | We have a number of custom variables set up in google analytics. We'd like to show a table of event occurrences broken down by two custom variables, e.g. if variable one can be A, B, or C and variable two can be J, K or L:
```
Events | A | B | C |
-------+-----+-----+-----+
J | 345 | 65 | 12 |
K | 23... | I'm going to assume you want this on your webpage.
Set up your webpage by following the tutorial here:
<http://code.google.com/apis/analytics/docs/gdata/1.0/gdataJavascript.html>
Then on the section header of "Retrieve Report Data," use this to filter your results:
<http://code.google.com/apis/analytics/docs/gdata/... |
8,831 | <p>I have a website which i have indexed on google for example (like 15 days ago).</p>
<p>some of my pages pass arguments like:</p>
<p><a href="http://www.bla.com/products.php" rel="nofollow">http://www.bla.com/products.php</a>?<strong>pro=bla</strong>&<strong>page=view</strong></p>
<p>suddently i saw that passi... | [
{
"answer_id": 8832,
"author": "kel",
"author_id": 5157,
"author_profile": "https://webmasters.stackexchange.com/users/5157",
"pm_score": 1,
"selected": false,
"text": "<p>Add a redirect in .htaccess for the URL's the Google has. There is no reason for them to get rid of them because the... | 2011/02/07 | [
"https://webmasters.stackexchange.com/questions/8831",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5229/"
] | I have a website which i have indexed on google for example (like 15 days ago).
some of my pages pass arguments like:
<http://www.bla.com/products.php>?**pro=bla**&**page=view**
suddently i saw that passing arguments like this isn't good for SEO purposes and
started using htaccess rewrite.
and changed the argument... | The proper way to handle this is to use a **canonical link in your header**.
The syntax goes like this:
```
<link rel="canonical" href="http://www.site.com/path-you-want" />
```
**This lets Google know which URL you prefer using for a page.**
This particularly useful to de-dupliacte pages as you may have multiple a... |
8,833 | <p>I'm looking for a way to force SSL and <code>www</code>.</p>
<p>I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: <code>http://example.com</code> and properly redirects to <code>https://www.example.com</code> but... | [
{
"answer_id": 8993,
"author": "Piers Karsenbarg",
"author_id": 3307,
"author_profile": "https://webmasters.stackexchange.com/users/3307",
"pm_score": 0,
"selected": false,
"text": "<p>Doesn't the third line have to be:</p>\n\n<pre><code>RewriteCond %{HTTP_HOST} ^example\\.com$\n</code><... | 2011/02/07 | [
"https://webmasters.stackexchange.com/questions/8833",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5233/"
] | I'm looking for a way to force SSL and `www`.
I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: `http://example.com` and properly redirects to `https://www.example.com` but when the incoming URL is `https://example.... | The first line is used to prevent internal URL's from being rewritten. That might cause different pages to be displayed, so I've removed it.
If the host is `example.com` or is not requested over HTTPS, it will be rewritten to `https://example.com/`. I.e., it rewrites `http://example.com`, `http://www.example.com` and ... |
8,853 | <p>I am trying to force SSL with <code>.htaccess</code> on a shared host. This means there I only have access to <code>.htaccess</code> and not the main <code>VirtualHost</code> configuration. I know you can put a rule in the <code>VirtualHost</code> config file to force SSL which will be picked up there (and acted upo... | [
{
"answer_id": 8854,
"author": "user5244",
"author_id": 5244,
"author_profile": "https://webmasters.stackexchange.com/users/5244",
"pm_score": 4,
"selected": true,
"text": "<p>If you have server-side execution such as php or cgi, then set your ErrorDocument to a file that does not requir... | 2011/01/29 | [
"https://webmasters.stackexchange.com/questions/8853",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/10759/"
] | I am trying to force SSL with `.htaccess` on a shared host. This means there I only have access to `.htaccess` and not the main `VirtualHost` configuration. I know you can put a rule in the `VirtualHost` config file to force SSL which will be picked up there (and acted upon first), preventing double authentication, but... | If you have server-side execution such as php or cgi, then set your ErrorDocument to a file that does not require authentication. This file should redirect the client to the proper location. Apache will set several REDIRECT\_ - prefixed environment variables to help you out, and the original environment is preserved --... |
8,914 | <p>I am not sure my title fully explains what I mean. I thought this might be an interesting question.</p>
<p>If I had a set of keywords, broken with a dash or 2, will search engines consider the dashed split keyword as maybe a full keyword?</p>
<p>Say I have a site that sort of breaks words down, like the dictionary... | [
{
"answer_id": 8915,
"author": "Justin",
"author_id": 46116,
"author_profile": "https://webmasters.stackexchange.com/users/46116",
"pm_score": 0,
"selected": false,
"text": "<p><em>Generally speaking</em> a search engine will treat a dash / hyphen (<code>-</code>) as a delimiter, and so ... | 2011/02/09 | [
"https://webmasters.stackexchange.com/questions/8914",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5282/"
] | I am not sure my title fully explains what I mean. I thought this might be an interesting question.
If I had a set of keywords, broken with a dash or 2, will search engines consider the dashed split keyword as maybe a full keyword?
Say I have a site that sort of breaks words down, like the dictionary sites do. So a k... | I've answered my question...
After using google to search for this page specifically, with the following keywords (or other variations)
<http://webmasters.stackexchange.com>: "keyword" Cooperative "Photography"
You'll find that a little ways down the results, this page was found. The 'strong' words being "Cooperativ... |
8,978 | <p>I run a (small) news website which has also a forum in a subfolder of the root. I'm planning to give the site a facelift and a code restructuration, so I wanted to put some redirect on the home page that will point directly to forum's index (www.mysite.com --> www.mysite.com/forum) while I tinker with it.
And that,... | [
{
"answer_id": 8980,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 4,
"selected": true,
"text": "<p>Do a 307 temporary redirect on the server side. You can do this with PHP or .htaccess, it doesn't matter which... | 2011/02/10 | [
"https://webmasters.stackexchange.com/questions/8978",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5139/"
] | I run a (small) news website which has also a forum in a subfolder of the root. I'm planning to give the site a facelift and a code restructuration, so I wanted to put some redirect on the home page that will point directly to forum's index (www.mysite.com --> www.mysite.com/forum) while I tinker with it.
And that, gi... | Do a 307 temporary redirect on the server side. You can do this with PHP or .htaccess, it doesn't matter which. But definitely make sure you send the 307 header as that is what tells the search engines the redirect is temporary and to try again later. Without it they will consider the pages removed which is exactly wha... |
8,997 | <p>I'm trying to set up my .htaccess file to take the displayed link and route it to the destination link as below</p>
<p>Displayed Link
<code>http://www.my-website.com/click-4559226-10388358?url=https%3A%2F%2Fdestination-website2.com%2FItem.php%3Fid%3D44350396%26sld%3DA6D7A632-821E-4b78-ACD0-147658B77BD6</code></p>
... | [
{
"answer_id": 8998,
"author": "ChrisJ",
"author_id": 5970,
"author_profile": "https://webmasters.stackexchange.com/users/5970",
"pm_score": 0,
"selected": false,
"text": "<p>On www.my-website.com:</p>\n\n<pre><code>Redirect permanent / http://www.destination-wabsite.com/\n</code></pre>\... | 2011/02/10 | [
"https://webmasters.stackexchange.com/questions/8997",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/42063/"
] | I'm trying to set up my .htaccess file to take the displayed link and route it to the destination link as below
Displayed Link
`http://www.my-website.com/click-4559226-10388358?url=https%3A%2F%2Fdestination-website2.com%2FItem.php%3Fid%3D44350396%26sld%3DA6D7A632-821E-4b78-ACD0-147658B77BD6`
Destination Link
`http://... | Try this in your `.htaccess` file:
```
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.olddomain.com$[OR]
RewriteCond %{HTTP_HOST} ^olddomain.com$
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
```
If it's not keeping the query string, try changing the last line of the code above to
... |
9,073 | <p>I want to have everything that looks like this:</p>
<pre><code>/1/2/3/4/5/[...]
</code></pre>
<p>to redirect to this:</p>
<pre><code>/index.php?u=/1/2/3/4/5/[...]
</code></pre>
<p><strong>unless</strong> the requested string is a specific file. So anything that doesn't have a <code>.</code> (dot), I want to redi... | [
{
"answer_id": 9075,
"author": "user5358",
"author_id": 5358,
"author_profile": "https://webmasters.stackexchange.com/users/5358",
"pm_score": 2,
"selected": false,
"text": "<p>Nevermind, figured it out. I found it's easier to match if something <strong>is</strong> in a string rather tha... | 2011/02/12 | [
"https://webmasters.stackexchange.com/questions/9073",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5358/"
] | I want to have everything that looks like this:
```
/1/2/3/4/5/[...]
```
to redirect to this:
```
/index.php?u=/1/2/3/4/5/[...]
```
**unless** the requested string is a specific file. So anything that doesn't have a `.` (dot), I want to redirect to `index.php?u=[...]`. I'll then parse the URI segments in PHP to d... | Nevermind, figured it out. I found it's easier to match if something **is** in a string rather than if it **isn't** in a string, so this is what I came up with:
```
^.*\..*$ -> /$0
[stop matching if found]
^.*$ -> /index.php?u=$0
```
Not correct syntax of course, but you can easily adapt it to any number of rerout... |
9,194 | <p>Basically my 'private' mediawiki instance was about as secure as a toddlers piggybank. I've tightened it up now, but am left with about a hundred or so new pages and revisions generated by hundreds of randomly generated users. </p>
<p>2 part question;
Is there a way to delete all orphaned pages?
Can I say to roll ... | [
{
"answer_id": 9221,
"author": "danlefree",
"author_id": 1064,
"author_profile": "https://webmasters.stackexchange.com/users/1064",
"pm_score": 3,
"selected": false,
"text": "<p>The easiest way to handle this situation (if you don't mind a nuke'n'pave) would be to export all wiki pages c... | 2011/02/15 | [
"https://webmasters.stackexchange.com/questions/9194",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5421/"
] | Basically my 'private' mediawiki instance was about as secure as a toddlers piggybank. I've tightened it up now, but am left with about a hundred or so new pages and revisions generated by hundreds of randomly generated users.
2 part question;
Is there a way to delete all orphaned pages?
Can I say to roll back all r... | If you don't want to use the export-and-reinstall method [suggested by danlefree](//webmasters.stackexchange.com/a/9221), you might also find the [Nuke](//www.mediawiki.org/wiki/Extension:Nuke) extension useful. Once installed, visiting the special page Special:Nuke as an administrator gives you a form like this:
>
>... |
9,218 | <p>I have a website with a number of pages that sport Twitter, Facebook and Reddit share buttons. They take forever to load and until they do the rest of the page doesn't load. So how I can make them load last? </p>
<p>Currently, they are loaded something like this:</p>
<pre><code><div class="item"><a href... | [
{
"answer_id": 9219,
"author": "keatch",
"author_id": 5117,
"author_profile": "https://webmasters.stackexchange.com/users/5117",
"pm_score": 1,
"selected": false,
"text": "<p>I suggest to read this article by Frederic Towsend, the author of the W3 Cache Plugin for WordPress: <a href=\"ht... | 2011/02/15 | [
"https://webmasters.stackexchange.com/questions/9218",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/632/"
] | I have a website with a number of pages that sport Twitter, Facebook and Reddit share buttons. They take forever to load and until they do the rest of the page doesn't load. So how I can make them load last?
Currently, they are loaded something like this:
```
<div class="item"><a href="http://twitter.com/share" clas... | I suggest to read this article by Frederic Towsend, the author of the W3 Cache Plugin for WordPress: <http://www.w3-edge.com/weblog/2011/02/optimize-social-media-button-performance/>. |
9,225 | <p>currently all my php generated rich html webpages start with this line, which I have been adding to my tempaltes YEARS ago... </p>
<pre class="lang-html prettyprint-override"><code><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<... | [
{
"answer_id": 9228,
"author": "tadamson",
"author_id": 1022,
"author_profile": "https://webmasters.stackexchange.com/users/1022",
"pm_score": 3,
"selected": true,
"text": "<p>It'll be fine for a long, long time - browsers will ignore whatever they don't specifically understand. XHTML it... | 2011/02/16 | [
"https://webmasters.stackexchange.com/questions/9225",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/3590/"
] | currently all my php generated rich html webpages start with this line, which I have been adding to my tempaltes YEARS ago...
```html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
```
UPDATE
======
**Who Should Use Which Doctype? When ... | It'll be fine for a long, long time - browsers will ignore whatever they don't specifically understand. XHTML itself will die out eventually (including 1.1), but browsers still have to support all HTML versions in some form, so it won't completely go away.
The hip new (technically HTML5, but very usable right now) doc... |
9,226 | <p>just need one url on my site to check if its a mobile device and then rerite the url accordingly.</p>
<p>want to rewrite;
/play-reel/miranda-bowen/playpeaches-and-cream
to
/<strong>mobile</strong>/play-reel/miranda-bowen/playpeaches-and-cream</p>
<pre><code>RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$ [NC]
RewriteR... | [
{
"answer_id": 9227,
"author": "v3nt",
"author_id": 69937,
"author_profile": "https://webmasters.stackexchange.com/users/69937",
"pm_score": 0,
"selected": false,
"text": "<p>this works but doesn't modify the visible url</p>\n\n<p>RewriteRule ^play-reel(.*)\\$ play-reel-new-html5-02.php?... | 2010/10/13 | [
"https://webmasters.stackexchange.com/questions/9226",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/69937/"
] | just need one url on my site to check if its a mobile device and then rerite the url accordingly.
want to rewrite;
/play-reel/miranda-bowen/playpeaches-and-cream
to
/**mobile**/play-reel/miranda-bowen/playpeaches-and-cream
```
RewriteCond %{HTTP_USER_AGENT} ^.*iPhone.*$ [NC]
RewriteRule ^play-reel(.*)\$ mobile/play-r... | Take a look at the code you’ve provided in the answer. I’m not sure, but it might look like this:
```
RewriteRule ^play-reel(.*)\$ mobile/play-reel/$1/$2 [R=302,NC]
``` |
9,230 | <p>Our pages can each have many tags, e.g 'football', 'sms', 'nsfw', etc.. which we would like to track in google analytics.</p>
<p>We're already tracking things like category using google analytics custom variables. We've used three of the five available slots so far.</p>
<p>How can we track tags the same way? If ... | [
{
"answer_id": 9227,
"author": "v3nt",
"author_id": 69937,
"author_profile": "https://webmasters.stackexchange.com/users/69937",
"pm_score": 0,
"selected": false,
"text": "<p>this works but doesn't modify the visible url</p>\n\n<p>RewriteRule ^play-reel(.*)\\$ play-reel-new-html5-02.php?... | 2011/02/16 | [
"https://webmasters.stackexchange.com/questions/9230",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5163/"
] | Our pages can each have many tags, e.g 'football', 'sms', 'nsfw', etc.. which we would like to track in google analytics.
We're already tracking things like category using google analytics custom variables. We've used three of the five available slots so far.
How can we track tags the same way? If we just mush them a... | Take a look at the code you’ve provided in the answer. I’m not sure, but it might look like this:
```
RewriteRule ^play-reel(.*)\$ mobile/play-reel/$1/$2 [R=302,NC]
``` |
9,247 | <p>I run a website where "x.php" was known to have vulnerabilities. The vulnerability has been fixed and I don't have "x.php" on my site anymore.</p>
<p>As such with major public vulnerabilities, it seems script kiddies around are running tools that hitting my site looking for "x.php" in the entire structure of the si... | [
{
"answer_id": 9249,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 3,
"selected": true,
"text": "<p>Recreate x.php and have it collect the IP address of anyone trying to reaching it. Then create (or modify) a .... | 2011/02/16 | [
"https://webmasters.stackexchange.com/questions/9247",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5448/"
] | I run a website where "x.php" was known to have vulnerabilities. The vulnerability has been fixed and I don't have "x.php" on my site anymore.
As such with major public vulnerabilities, it seems script kiddies around are running tools that hitting my site looking for "x.php" in the entire structure of the site - const... | Recreate x.php and have it collect the IP address of anyone trying to reaching it. Then create (or modify) a .htaccess file that blocks them using Apache. The .htaccess file will look like this:
```
order deny,allow
deny from 123.123.123.123
deny from 255.255.255.255
```
Just keep appending to that file any IP addre... |
9,273 | <p>I'm using a .png favicon file and it is not showing up on my site.</p>
<p>Doing a grep, I see the following in home.htm which looks right for me(I have also confirmed it's in the HEAD section within home.htm):</p>
<pre><code>home.htm: <link rel="shortcut icon" type="image/png" href="favicon.png">
</code></pr... | [
{
"answer_id": 9274,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "<p>Not all browsers support showing png type of favicon. You may want to check the wiki page for support table.</p>\n... | 2011/02/16 | [
"https://webmasters.stackexchange.com/questions/9273",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5470/"
] | I'm using a .png favicon file and it is not showing up on my site.
Doing a grep, I see the following in home.htm which looks right for me(I have also confirmed it's in the HEAD section within home.htm):
```
home.htm: <link rel="shortcut icon" type="image/png" href="favicon.png">
```
The favicon.png file is in the s... | I'll ad my voice to the chorus and say the problem is that it's not in ICO format. Take a look here for a Photoshop plug-in: <http://www.telegraphics.com.au/svn/icoformat/trunk/dist/README.html> |
9,280 | <p>I have recently designed a website with no img tags, only one big fat CSS sprite with everything in it. Though, when I try to publish that website on Facebook, it won't show a preview thumbnail — probably because it doesn't find any images on the markup. Any suggestions? I'd still like to keep it a super fast img-le... | [
{
"answer_id": 9281,
"author": "balexandre",
"author_id": 84,
"author_profile": "https://webmasters.stackexchange.com/users/84",
"pm_score": 3,
"selected": true,
"text": "<p>I would suggest this reading</p>\n\n<blockquote>\n <p><a href=\"http://www.ehow.com/how_4938148_thumbnail-show-up... | 2011/02/17 | [
"https://webmasters.stackexchange.com/questions/9280",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5425/"
] | I have recently designed a website with no img tags, only one big fat CSS sprite with everything in it. Though, when I try to publish that website on Facebook, it won't show a preview thumbnail — probably because it doesn't find any images on the markup. Any suggestions? I'd still like to keep it a super fast img-less ... | I would suggest this reading
>
> [How to Get Your Website Preview Thumbnail to Show Up on Facebook Share](http://www.ehow.com/how_4938148_thumbnail-show-up-facebook-share.html)
>
>
>
[Google](http://www.google.com/search?rls=en&q=facebook+link+thumbnail) is your friend :)
---
It all resumes to add a meta info t... |
9,312 | <p>Example of current file structure:</p>
<pre><code>example.com/foo.php
example.com/bar.html
example.com/directory/
example.com/directory/foo.php
example.com/directory/bar.html
example.com/cgi-bin/directory/foo.cgi*
</code></pre>
<p>I would like to remove HTML, PHP, and CGI extensions from, and then forc... | [
{
"answer_id": 9313,
"author": "Mark Henderson",
"author_id": 138,
"author_profile": "https://webmasters.stackexchange.com/users/138",
"pm_score": 0,
"selected": false,
"text": "<p>If you're know the exact format of each URL that you need, then it's pretty straight forward. If you don't ... | 2010/03/18 | [
"https://webmasters.stackexchange.com/questions/9312",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | Example of current file structure:
```
example.com/foo.php
example.com/bar.html
example.com/directory/
example.com/directory/foo.php
example.com/directory/bar.html
example.com/cgi-bin/directory/foo.cgi*
```
I would like to remove HTML, PHP, and CGI extensions from, and then force the trailing slash at th... | So I wrote a set of Rewrite rules that did what you wanted, but it completely broke my website. I realized that what you want is probably not what you need. Adding trailing slashes to the end of all URLs really messes with the semantics of the URL in that you're no longer accessing the file `/foo` but the content listi... |
9,429 | <p>For usability purposes, entire article thumbnail is wrapped to a link.</p>
<pre><code><a href="/some_article">
<h2>Article title</h2>
<div class="summary">Lorem ipsum dolor sit amet</div>
</a>
</code></pre>
<p>User needs to click on any place of a thumb and it will be redi... | [
{
"answer_id": 9431,
"author": "John Conde",
"author_id": 1253,
"author_profile": "https://webmasters.stackexchange.com/users/1253",
"pm_score": 3,
"selected": true,
"text": "<blockquote>\n <p>Does this approach have some negative\n effect to SEO ?</p>\n</blockquote>\n\n<p>I'd say it i... | 2011/02/20 | [
"https://webmasters.stackexchange.com/questions/9429",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/6335/"
] | For usability purposes, entire article thumbnail is wrapped to a link.
```
<a href="/some_article">
<h2>Article title</h2>
<div class="summary">Lorem ipsum dolor sit amet</div>
</a>
```
User needs to click on any place of a thumb and it will be redirected to article.
Does this approach have some negative effe... | >
> Does this approach have some negative
> effect to SEO ?
>
>
>
I'd say it is neither positive nor negative. There's so much content in the hyperlink that whatever keywords are present are going to be too diluted to have any value. But doing this isn't bad for any reason, either.
>
> Just a link to article in... |
9,434 | <p>Is there an easy way to move a blog from wordpress website i.e. at</p>
<pre><code>http://myblog.wordpress.com/
</code></pre>
<p>to my independent domain i.e</p>
<pre><code>www.mywebsite.com
</code></pre>
| [
{
"answer_id": 9435,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>If you're moving to another host with Wordpress already setup, you can <a href=\"http://en.support.wordpress.com/e... | 2011/02/20 | [
"https://webmasters.stackexchange.com/questions/9434",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | Is there an easy way to move a blog from wordpress website i.e. at
```
http://myblog.wordpress.com/
```
to my independent domain i.e
```
www.mywebsite.com
``` | If you don't mind keeping the site with wordpress.com, you can just get the domain name added to your account. It costs http://en.wordpress.com/products/ |
9,437 | <p>I have setup some rules in which subdomains (my users) will default to where I have located the robots.txt, favicon.ico, and crossdomain.xml</p>
<p>therefore if a user creates a site say</p>
<p><code>testing.mywebsite.com</code> and they don't make their own favicon.ico at <code>testing.mywebsite.com/favicon.ico</... | [
{
"answer_id": 9435,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 0,
"selected": false,
"text": "<p>If you're moving to another host with Wordpress already setup, you can <a href=\"http://en.support.wordpress.com/e... | 2011/02/17 | [
"https://webmasters.stackexchange.com/questions/9437",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/5568/"
] | I have setup some rules in which subdomains (my users) will default to where I have located the robots.txt, favicon.ico, and crossdomain.xml
therefore if a user creates a site say
`testing.mywebsite.com` and they don't make their own favicon.ico at `testing.mywebsite.com/favicon.ico`, then it will use the favicon.ico... | If you don't mind keeping the site with wordpress.com, you can just get the domain name added to your account. It costs http://en.wordpress.com/products/ |
9,457 | <p>I have a hosting account with godaddy. Its a linux system running apache. The way they do their setup is your primary domain is the root folder. When you add a subdomain its in a subfolder of the root which sucks. I want to setup a subfolder structure to organize my domains.. I called godday support and they sa... | [
{
"answer_id": 9458,
"author": "Matthew Scharley",
"author_id": 2533,
"author_profile": "https://webmasters.stackexchange.com/users/2533",
"pm_score": 1,
"selected": false,
"text": "<p>I run my own server on a similar principle, this is my configuration:</p>\n\n<p>It should work with lit... | 2011/02/21 | [
"https://webmasters.stackexchange.com/questions/9457",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I have a hosting account with godaddy. Its a linux system running apache. The way they do their setup is your primary domain is the root folder. When you add a subdomain its in a subfolder of the root which sucks. I want to setup a subfolder structure to organize my domains.. I called godday support and they said to us... | I run my own server on a similar principle, this is my configuration:
It should work with little modification for you assuming that GoDaddy supports this type of thing (it seems to from your question), except you'll need to change paths obviously. This configuration rewrites into folders like `/var/www/vhosts/example.... |
9,490 | <p>I'm having problems with the following config on my Apache server to Rewrite some URLs.</p>
<pre><code>SetEnv PATH_TO_DIR /directory
RewriteRule ^%{PATH_TO_DIR}/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-\.]+)/?$ /index.php?dir=$1&file=$2
ErrorDocument 404 %{PATH_TO_DIR}/index.php?dir=null&file=error
</code></pre>
... | [
{
"answer_id": 9491,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "<p>Should not <code>%{PATH_TO_DIR}</code> be <code>%{ENV:PATH_TO_DIR}</code>? Also, I am not certain that you can use... | 2011/02/21 | [
"https://webmasters.stackexchange.com/questions/9490",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I'm having problems with the following config on my Apache server to Rewrite some URLs.
```
SetEnv PATH_TO_DIR /directory
RewriteRule ^%{PATH_TO_DIR}/([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-\.]+)/?$ /index.php?dir=$1&file=$2
ErrorDocument 404 %{PATH_TO_DIR}/index.php?dir=null&file=error
```
This config used to work perfec... | Should not `%{PATH_TO_DIR}` be `%{ENV:PATH_TO_DIR}`? Also, I am not certain that you can use those variables on the rule, I think they can be used only on the `RewriteCond`.
Give it a look [here](http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritecond) and [here](http://httpd.apache.org/docs/2.2/mod/mod_rewr... |
9,493 | <p>I want <code>http://www.foo.com/</code> to internally point to <code>/var/www/home.php</code> and <code>http://www.foo.com/home.php</code> to be redirected to <code>http://www.foo.com/</code>.</p>
<p>Thus, I would like to fix the old <code>http://www.foo.com/home.php</code> to the new one <code>http://www.foo.com/<... | [
{
"answer_id": 9494,
"author": "EEAA",
"author_id": 2665,
"author_profile": "https://webmasters.stackexchange.com/users/2665",
"pm_score": 0,
"selected": false,
"text": "<p>In your virtualhost definition for foo.com:</p>\n\n<pre><code>DocumentRoot /var/www/\n</code></pre>\n\n<p>Then your... | 2011/02/20 | [
"https://webmasters.stackexchange.com/questions/9493",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I want `http://www.foo.com/` to internally point to `/var/www/home.php` and `http://www.foo.com/home.php` to be redirected to `http://www.foo.com/`.
Thus, I would like to fix the old `http://www.foo.com/home.php` to the new one `http://www.foo.com/`. But I always get infinite loop or other strange error no matter what... | If you just want home.php to be the directory index (as opposed to the usual index.php, etc), you don't need the overhead of mod\_rewrite to do it:
```
DirectoryIndex home.php index.php index.html // and so on
```
It works in directory .htaccess files too, if you want to maintain a different default elsewhere. More ... |
9,495 | <p>I have an Apache2 web server (v. 2.2.16) running on Debian hosting three virtual hosts. The first two hosts are HTTP only (server1 and server2). The last host is HTTPS only (server3). My virtual host configuration files can be found at <a href="http://pastebin.com/parur3RJ" rel="nofollow">pastebin</a>. I would like ... | [
{
"answer_id": 9496,
"author": "Phil P",
"author_id": 5545,
"author_profile": "https://webmasters.stackexchange.com/users/5545",
"pm_score": 3,
"selected": true,
"text": "<p>What I do: use vhosts for each site, including a vhost for the variant I want to suppress. This keeps all the conf... | 2011/02/19 | [
"https://webmasters.stackexchange.com/questions/9495",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I have an Apache2 web server (v. 2.2.16) running on Debian hosting three virtual hosts. The first two hosts are HTTP only (server1 and server2). The last host is HTTPS only (server3). My virtual host configuration files can be found at [pastebin](http://pastebin.com/parur3RJ). I would like to use mod rewrite to get the... | What I do: use vhosts for each site, including a vhost for the variant I want to suppress. This keeps all the configuration for a named site in one place. The duplication of content is minimal thanks to `mod_macro`.
You want to issue a redirect, not rewrite internally, since the idea is to get the *client* to retry us... |
9,504 | <p>I have a standard CMS-like <code>RewriteRule</code> set up in my .htaccess:</p>
<pre><code>RewriteRule ^(.+)$ index.php?slug=$1
</code></pre>
<p>Let's say I have a directory called <code>foo</code> in the root directory. For some reason, if you hit the page it causes a redirect:</p>
<p><code>http://example.com/fo... | [
{
"answer_id": 9505,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "<p>Before the <code>RewriteRule</code> put:</p>\n\n<pre><code>RewriteCond %{REQUEST_FILENAME} !-d\n</code></pre>\n\n<... | 2011/02/17 | [
"https://webmasters.stackexchange.com/questions/9504",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I have a standard CMS-like `RewriteRule` set up in my .htaccess:
```
RewriteRule ^(.+)$ index.php?slug=$1
```
Let's say I have a directory called `foo` in the root directory. For some reason, if you hit the page it causes a redirect:
`http://example.com/foo` redirects to `http://example.com/foo?slug=foo`
Removing ... | Try,
```
DirectorySlash off
```
It's not the rewrite generating the redirect but `mod_dir`. |
9,506 | <p>I want to use domains like xxx.abc.domain.tld.<br>
The xxx is my folder to access. I tried it with the rewrite rules, but I can't get it working, because I don't know how to get the part xxx from the SERVER_NAME into my RewriteRule.</p>
<p>This was my try:</p>
<pre><code>UseCanonicalName Off
# include the IP addr... | [
{
"answer_id": 9507,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 1,
"selected": false,
"text": "<p>If the URLs that are being used contain the xxx as part of the server name then it's possible to use <a href=\"htt... | 2011/02/17 | [
"https://webmasters.stackexchange.com/questions/9506",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I want to use domains like xxx.abc.domain.tld.
The xxx is my folder to access. I tried it with the rewrite rules, but I can't get it working, because I don't know how to get the part xxx from the SERVER\_NAME into my RewriteRule.
This was my try:
```
UseCanonicalName Off
# include the IP address in the logs so th... | Would it not be easier to inject the hostname into the rewrite rule via a RewriteCond back-reference?
```
UseCanonicalName Off
# include the IP address in the logs so they may be split
LogFormat "%A %h %l %u %t \"%r\" %s %b" vcommon
CustomLog /var/log/apache2/vaccess.log vcommon
RewriteEngine On
# a ServerName deri... |
9,509 | <p>I am trying to remove the context name from the URL of my server.</p>
<p>Current URL - <code>http://www.domainname.com/MyApp/</code></p>
<p>What I need to make is to make it available at - <code>www.domainname.com/</code></p>
<p>So it is only going to host one main app and that needs to be displayed when we open ... | [
{
"answer_id": 9510,
"author": "matthew",
"author_id": 1131,
"author_profile": "https://webmasters.stackexchange.com/users/1131",
"pm_score": 1,
"selected": false,
"text": "<p>Assuming that <code>http://www.domainname.com/MyApp/</code> works as is... shouldn't you be able to just use you... | 2011/02/17 | [
"https://webmasters.stackexchange.com/questions/9509",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I am trying to remove the context name from the URL of my server.
Current URL - `http://www.domainname.com/MyApp/`
What I need to make is to make it available at - `www.domainname.com/`
So it is only going to host one main app and that needs to be displayed when we open `www.domainname.com/` on browser.
I have alre... | Assuming that `http://www.domainname.com/MyApp/` works as is... shouldn't you be able to just use your final RewriteRule? Just drop the RewriteCond and the 'P' flag.
Or if you're going to use mod\_rewrite to do the proxy with the 'P' flag, don't you need to use the full URL in the RewriteRule? Something like `http://... |
9,511 | <p>I'm trying to hack the CSS files on OSTicket by replacing them with my own custom ones when a specific URL is accessed.</p>
<p>The URL that is accessed for this example is:<br>
<code>http://example.com/helpdesk/scp/css/main.css</code></p>
<p>and I would like it to use the CSS file at:<br>
<code>http://example.com/... | [
{
"answer_id": 9512,
"author": "Community",
"author_id": -1,
"author_profile": "https://webmasters.stackexchange.com/users/-1",
"pm_score": 2,
"selected": false,
"text": "<p>Delete space between <code>NC,</code> and <code>L</code>. Also check <code>AllowOverride All</code> (or <code>File... | 2011/02/16 | [
"https://webmasters.stackexchange.com/questions/9511",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/-1/"
] | I'm trying to hack the CSS files on OSTicket by replacing them with my own custom ones when a specific URL is accessed.
The URL that is accessed for this example is:
`http://example.com/helpdesk/scp/css/main.css`
and I would like it to use the CSS file at:
`http://example.com/test.css`
Why won't this .htaccess... | Delete space between `NC,` and `L`. Also check `AllowOverride All` (or `FileInfo`):
```
RewriteEngine On
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)main\.css$ /test.css [NC,L]
``` |