Forum Moderators: mack
My url is widgets.com. At times www.widgets.com has been used to point out my site. I've read that I should add the 301 redirect, so that all the www pages are dropped. How and where would I do that? I would like it if none of the pages were www. Some show that way but most don't.
I have a wholesale store and a retail store. I don't want the search engines going into my wholesale store and quoting prices from it. (They have) I've read that I should add a 'no follow' to the wholesale store. Again, how and where plz.
The last thing I want to do is clean up my code. This one has been bothering me a lot. It's on every page because I'm using it on a template. I just don't understand what I need to do to fix it:
Error Line 47 column 103: required attribute "ALT" not specified.
...es/img1.gif" width="119" height="143"></TD>
The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
Error Line 49 column 84: required attribute "ALT" not specified.
...etics.com/shop/images/shopbanner.jpg"></TD>
Error Line 51 column 117: required attribute "ALT" not specified.
...lign="right" width="136" height="143"></TD>
your img tag would look something like this:
<img src="theimagename.gif" width="120" height="80" alt="The Image" />
In Dreamweaver, if you use design view, there's a little box for it in the properties panel.
If you have images that don't have a description (like spacer gifs) you can declare an empty element - alt="".
While I am not the one to answer your questions about 301's and NoFollow attributes, solving your validation issue is easy:
You need to add alternative (alt) attributes to your images so that they validate for basic accessibility.
Typical html might be: <img src="image.jpeg" width="100px" height="100px" alt="description of your image here">
>> added - beat me to it Mamadawg ...
Redirecting from 'www' to 'non-www' can be done with this code:
RewriteCond %{HTTP_HOST} ^www.example.com [NC]in httpd.conf.
RewriteRule ^(.*)$ http://example.com$1 [L,R=301]
Make sure that 'RewriteEngine on' is in your configuration to enable rewrite engine and that 'LoadModule rewrite_module modules/mod_rewrite.so' is un-commented.
Andrew
I got two of the alt tags to work and the middle one won't for some reason - it just displays under the picture so i removed it. These pictures have an absolute address so the alt box in photoshop wasn't available for them. Now that I know what the validation problem is, I'm not sure that it matters. If I can fix it easily then I will, but no point stressing out obver it.
Now i have:
<TABLE border="0" cellpadding="0" cellspacing="0" style="collapse" width="100%" id="AutoNumber1">
<TR>
<TD width="33%">
<IMG border="0" src="http://mysite.com/shop/images/img1.gif" alt="logo" width="119" height="143"></TD>
<TD width="33%">
<IMG border="0" src="http://mysite/shop/images/shopbanner.jpg"></TD>
<TD width="34%">
<IMG border="0" src="http://mysite.com/shop/images/img3.gif" alt="logoflipped" align="right" width="136" height="143"></TD>
</TR>
<TABLE border="0" width="100%" cellspacing="0" cellpadding="1">
<TR class="headerNavigation">
<TD class="headerNavigation"> </TD>
<TD align="right" class="headerNavigation"> </TD>
</TR>
</TABLE>
When I put alt="banner" width="540" height="127"
or alt="banner" align="center" width="540" height="127"
in the same position for the centre banner in exactly the same place as I did for the two logos it wouldn't work!
The other two answers, I appreciate them but I have no idea where to do this. Do I do it somewhere in photoshop? Do I log in to my server and do it there? If so where? the root directory? I haven't ever done anything directly there except change permissions so I really don't know how to go about it.
Again, thanks for all the help :)
Sue
There is a forum here that eplains all [webmasterworld.com...]
You can go to any site and request the robots.txt file..
[sitename.com...]
So all those folders and files are in public_html so I created a file there called robots.txt and told the robots not to go looking in my wholesale folder. Hope it works! When I sell and item for 10$ retail I don't want retail customers seeing that it only costs $5 wholesale.
just the 301 redirect to figure out now.
would that be in the same place and created the same way?
do I need to do a redirect for every page or just one for the whole site?
I paaster this snippet into that file.
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com$1 [L,R=301]
nothing happened :(
what is httpd.conf.?
Also how would I do this:
Make sure that 'RewriteEngine on' is in your configuration to enable rewrite engine and that 'LoadModule rewrite_module modules/mod_rewrite.so' is un-commented.
I can't see anything about configuration. I could change the permissions on the htaccess file, but i don't think that is what was meant.
what sort of thing am I looking for to do those things in?
Options +FollowSymLinks
RewriteEngine on
You have to include that to turn it on.
That would make it:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com$1 [L,R=301]
(I've never used that actual rewrite code above, because I do things the other way, from non-www to www.)
I needed to log in to my admin for the wholesale store.
Got a 401 error, so I can't.
I did the same thing on my Canadian site and I get the error there too :(
well, at least i can remove the:
User-agent: *
Disallow: /wholesale
but I guess it leaves the search engines able to index a member only area and display my wholesale prices :(
Any workaround that anyone can think of? should I mention each search engine bot by name?
MSNBot
Googlebot
Inktomi Slurp
Unknown robot (identified by 'spider')
AskJeeves
Unknown robot (identified by 'crawl')
Unknown robot (identified by hit on 'robots.txt')
LinkWalker
Unknown robot (identified by 'robot')
are these the names I would put instead of the *?
MSNBot
Googlebot
Slurp
spider
AskJeeves
crawl
Unknown robot (identified by hit on 'robots.txt')?
LinkWalker
robot
Still can't log in to my oscommerce store's admin :(
Now I really don't understand it. I undid absolutely everything that I did yesterday.
I put the redirect back again for now. I'm trying to understand what could have happened. The store is working fine. I logged in as a customer and everything was good. It's just the admin login for it that isn't available.
now it's changing the address to [widgets.com401.shtml...]
even when I emptied out both the htaccess and the new file i made called robots.txt. I thought I'd try getting rid of that just in case it thought that admin login was a robot. after all, that was the file I had told the bots not to look at.
But checking a bit more, I can't log in to my retail store admin either - same problem. And I didn't do anything to that.