Forum Moderators: mack

Message Too Old, No Replies

3 newbie problems.

         

SueBee

7:15 am on May 7, 2006 (gmt 0)

10+ Year Member



I've had this website over a year now. Mostly I've been using dreamweaver. I'm not a technical sort of person.

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>

MamaDawg

12:42 pm on May 7, 2006 (gmt 0)

10+ Year Member



ALT is an img tag attribute (like height and width) and specifies text that displays in place of the image if someone visits your site with images turned off in their browser - for example, someone who is visually impaired or someone with a slow connection who doesn't want to wait while images load. Search engines like it too.

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="".

limbo

12:50 pm on May 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Sue Bee - Welcome to WebmasterWorld [webmasterworld.com] :)

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 ...

jbinbpt

1:11 pm on May 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Do you have a robots.txt file that should prevent your site from being indexed? Well behaved bots will comply, bad bots will not.

example that excludes everyone

User-agent: *
Disallow: /store

Little_G

1:46 pm on May 7, 2006 (gmt 0)

10+ Year Member



Hi,

Redirecting from 'www' to 'non-www' can be done with this code:

RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.com$1 [L,R=301]
in httpd.conf.

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

SueBee

6:08 pm on May 7, 2006 (gmt 0)

10+ Year Member



Thank you everyone. I really appreciate the help.

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">&nbsp;&nbsp;</TD>
<TD align="right" class="headerNavigation">&nbsp;&nbsp;</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

SueBee

6:10 pm on May 7, 2006 (gmt 0)

10+ Year Member



By the way, I've never put a robots text file anywhere. It may be there (where?)by default - I don't know.
The robots visit my site every day. I don't think they have any problems at the moment.

limbo

6:44 pm on May 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



it just displays under the picture so i removed it

The only reason I think it would do that is if your syntax contained an error - perhaps a closing "?

A comon mistake - i've done it loads of times ;)

jbinbpt

6:56 pm on May 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A robots.txt file should prevent the search engines from indexing your store. It is a text file that EXCLUDES portions of your site. If you don't have one then the search engines think you want them to index everything.

There is a forum here that eplains all [webmasterworld.com...]

SueBee

7:22 pm on May 7, 2006 (gmt 0)

10+ Year Member



Thanks.
I get that I need to put:
User-agent: *
Disallow: /wholesale
somewhere. I just don't know where that 'somewhere' is. I'm sure it'll be very easy once I know, but I don't know.
I read quite a bit in that forum. There wasn't any mention of where that should go that I could find.

Sue

SueBee

7:36 pm on May 7, 2006 (gmt 0)

10+ Year Member



looking in my root folder, there is somthing there that I can use to create a file. Would I do that, call the file robots.txt and then edit it to have the:
User-agent: *
Disallow: /wholesale

That seams to be the most logical place for it to me.

jbinbpt

8:15 pm on May 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can use any text editor to do this. Save it the folder where your html pages are.

You can go to any site and request the robots.txt file..
[sitename.com...]

SueBee

8:53 pm on May 7, 2006 (gmt 0)

10+ Year Member



Thanks jbinbpt

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?

jbinbpt

9:40 pm on May 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How you handle the redirect depends on what kind of server you are on. Check out he Apache forum if that is your platform.

SueBee

1:50 am on May 8, 2006 (gmt 0)

10+ Year Member



I guess I have an apache server.
there was an htaccess file in public_html

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?

Stefan

2:27 am on May 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Did you also put this before your RewriteCond?

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.)

SueBee

3:58 am on May 8, 2006 (gmt 0)

10+ Year Member



Thank you stefan:) That does it for my site.

It always seems so simple when one finds out how it is done. I've been wanting to do this for months.

2 2/3 out of 3 problems solved. A good weekend! I really aoppreciate all the input.

Stefan

4:03 am on May 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're quite welcome. Glad it worked :-)

SueBee

10:36 pm on May 8, 2006 (gmt 0)

10+ Year Member



Guess not everything worked as well as I thought it would.

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?

SueBee

10:42 pm on May 8, 2006 (gmt 0)

10+ Year Member



If that's the route to go, here are the bots that visit me every day.

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

SueBee

10:51 pm on May 8, 2006 (gmt 0)

10+ Year Member



Actually that doesn't work :(
I put in
User-agent:MSNBot
Disallow: /wholesale
User-agent:Googlebot
Disallow: /wholesale
User-agent:Slurp
Disallow: /wholesale
User-agent:spider
Disallow: /wholesale
User-agent:AskJeeves
Disallow: /wholesale
User-agent:crawl
Disallow: /wholesale
User-agent:LinkWalker
Disallow: /wholesale
User-agent:robot
Disallow: /wholesale
and I still couldn't log in to my admin. then I removed them all and I still can't log in.

SueBee

11:34 pm on May 8, 2006 (gmt 0)

10+ Year Member



I removed the redirect from www.widgets.com to widgets.com too.

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.

jbinbpt

12:01 am on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It sounds like the changes to .htaccess are messing up.

Did you not have an .htaccess prior to this? If you did, did you save a copy?

I would test the shortcut to the admin panel. If it has www then remove it or if not then add it.

SueBee

12:13 am on May 9, 2006 (gmt 0)

10+ Year Member



There was always an htaccess in public_html and is was completely empty before this.

SueBee

12:19 am on May 9, 2006 (gmt 0)

10+ Year Member



To log in to my Oscommerce admin I go to widgets.com/wholesale/admin

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.

jbinbpt

9:28 am on May 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you are having problems with parts that you did not touch, then it's time to contact the host.