Help with htaccess 301 error

  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

:oops: sorry to say, i know some things, but others just escape my mind.
I saw all the posts on 301 error codes but noone, wrote on competetly out so that you maybe wudn't get lost with it.
I wrote one to add to the ones in hta already, it still gives me my page, but do I need to make an error page for this too?
I work in frontpage 2002. I need this error code for 3 domain names that point to my site because I believe that dropping from the top 10 in google is going to make my sites go under.....they are on the way....HELP PLEASE ANYONE??????? REAL INSTRUCTIONS???? for a dummy :shock:
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

Don't look like nobody is going to answer me?
:(
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

Don't look like nobody can understand a word you're saying ;)

Try to form a more accurate sentence structure with your questions, along with examples of what you're doing right now, in what way it's not working in the form you desire, and what you would like to do to change the way things are working.

When you say "hta", do you mean .htaccess? If so, say that, if not, then you can see how confusion can start, making it impossible for people to answer your questions :)
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

Its me, and you all say HTA a lot in here. Look at posts in here.
Its an error code 301 which I already mentioned.
Its a HTAACCESS CODE 301 for redirecting a domain which you all already have that in here. BUT I NEED someone to give me an example of an htaccess 301 error code
I know this much
ErrorDocument 301 / oldsite/newsite

does that automatically redirect????? and DO [AS I SAID] I NEED AN ERROR PAGE AS WELL????? and HOW DO I SET THAT UP????

I'm not entirely stupid here. Just asking for help........maybe this wasn't such a good idea :roll:
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

ErrorDocument 301 http://www.somedomain.com
ErrorDocument 301 /error301.html

Just one of those lines in a .htaccess file, with the correct URL of wherever you want to send somebody, will automatically forward people to the URL you specified in the event of an Error 301.

Exactly the same as any other error... For example..

ErrorDocument 404 /error404.html

If they went to a URL that didn't exist it would send them to /error404.html where you would explain that the URL they're attempting to locate does not exist. :)
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

can you pass variables with that? like /error.php?er=301
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

I appreciate the straight answer, and sorry if I broke rules, or didn't speak plain.
Have a nice nite. :D God Bless you
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

b_heyer wrote:
can you pass variables with that? like /error.php?er=301


Yes, but you would be passing the same variable each time. The only thing I think is possible would be your example; having a common error script that changes behaviour (hopefully) depending on the exact error. Under normal circumstances (maybe I missed something), it would be more efficient to have individual errors scripts (eg. 301.php, or 404.php).
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

As far as I know you can b_heyer, because PostNuke's default Error404 sends you to /error.php?op=404

So, presumably you could have like..

/error.php?op=404

for file not found...

/error.php?op=500

for internal server (script) error...

And have your PHP script pull the right info to send to the user accordingly.
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Axe wrote:
/error.php?op=500 ...for internal server (script) error...


This raises a related point. Shouldn't the 5xx error messages point to text/html pages just in case the server is sick; not the script.
  • Axe
  • Genius
  • Genius
  • User avatar
  • Posts: 5739
  • Loc: Sub-level 28

Post 3+ Months Ago

That could be a very good idea... although, if the server is sick, whether the user sees the error page or not is probably the least of your concerns, lmao.
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

Hi again,

I put in the error code 301 like you said.
I did not put a redirect, or anything except the url where i wanted the page to go.
Will google now read it as a permnantly moved page?
OR do I need something else in there.
the error codes I have are as follows:

ErrorDocument 404 http://.net from server
ErrorDocument 206 http://.net from server

ErrorDocument 401 http://.net from server
ErrorDocument 403 http://.net from server

ErrorDocument 500 http://my first .com domain on the server
ErrorDocument 302 http://www.firstdomain

ErrorDocument 301 http://www.newdomain
ErrorDocument 301 http://www.newdomain

any help? or is this all I need. It works. they already have my first.com and my new domains directing to the .netfrom the server
I just want to make sure that this gets read right......thanks
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

You should quickly read the Status Code Definitions of RFC2616. I don't feel 100% that you are accomplishing what your intend.

Quote:
10.3.2 301 Moved Permanently

The requested resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs.

http://www.ietf.org/rfc/rfc2616.txt?number=2616


If Google conforms to the HTTP/1.1 standard, it will refer to the new page on future requests.

Why are you using 201 Created, and 206 Partial Content?
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

I really don't know, someone helped me set that up 2 years ago.
I probly don't need that do I?
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

If you want a fancy 404 page (broken links, i.e. http://wp.netscape.com/broken-link/), go for it. Use the 301 page to re-direct user-agents to re-located pages. They're both fairly safe.

Avoid the rest unless you know exactly what they are and why you are using them. It is very easy to make a bad situation worse by messing with the normal behaviors of a service.
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

Thanks, I trusted my friend to go and set that up 2 years ago,
she has went to college for this stuff for 5 or 6 years and owns a website online,
shoot I just took it for granted she knew what to do :(
I have never went to college, I learned from reading, applying to see if it works if not I go on to something else. Trial and error
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

madisonlist wrote:
...I just took it for granted she knew what to do


maybe she does, i don't know everything about your web site. in fact, i hardly know anything.

but... it is unusual to use 201 Created, and 206 Partial Content?
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

I just went to try and remove that 201 created and 206
ya know, the htaccess came up with a page not found inside the files on the server where you change your files.

now what?

ok....my website is http://www.madisonlist.com
http://www.ashville-hotels.com is one of the new domains
http://www.little-kids-clothing.com is the other

should have gave u that before
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

madisonlist wrote:
...htaccess came up with a page not found inside the files on the server where you change your files.


Sorry, I don't understand. .htaccess doesn't come up with anything. It configures a web server on a per-directory basis.

...inside the files on the server where you change your files?
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

I am sorry.
I went to my account [where you change the .htaccess]
The file I changed last night is not there.
There is a page that pops up and says
page not found?
I don't understand that either but now I cannot change the file at all.

My account has a file manager. The .htacces file is in a folder in the file manager. I cannot access it.

Does that make more sense?
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

Ok, now I understand. And, unfortunately, can't help you. This has gone beyond the scope of .htaccess. Other gremlins are at work... you need to contact your system administrator and discuss.
  • madisonlist
  • Novice
  • Novice
  • madisonlist
  • Posts: 15

Post 3+ Months Ago

Yall might be glad to know that
that pop up error i was getting was from the
service I have and they fixed it.
I can now access them.


I also talked to an expert with the web search engines
They told me I didn't need to worry about this.
Many people do buy domain names more than one and point to the main site.
By the way.....my site is on the way back up.....
Thanks for the help.....

Post Information

  • Total Posts in this topic: 22 posts
  • Users browsing this forum: No registered users and 58 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.