logo-dw

Go Back   Dreamweaver Club Forums > Dreamweaver forums > Dreamweaver General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-26-2015, 03:40 AM   #1
vinnyvangogh
 
Join Date: Aug 2009
Posts: 84
Default The Redirect 301 saga

My hosting is with 1&1 Uk - what was called shared hosting - is now called a virtual server. Its a Linux platform - but the main "engine" is Apache.
No cPanel - no access to the rewrite module.

Support ( a loose term!) say Apache is set at default - which means my server will run a .htaccess file with a Redirect 301/.

The website being rebuilt - originated around 2003 made by a "professional studio" and I suppose for the day - it was as good as there was.
I took over around 2004/5 and kept the same structure and page names and just rebuilt the lot with new content. 3 times over the years.

To comply with Google media friendly "Responsive" website - which it was until the mandate changed to cater for "smartphones" so it was time for a rebuild and new layouts.

The site had got bloated to 98 pages or so ( some already defunct)

The first page I tried to redirect is in the last of a nest of three folders.

I first tried redirect 301/oldfile.html newfile.html in the root - nothing
tried in the folder of the old file - nothing

Rapidtables.com have write tool and use full URLs I inserted the actual info.. took the code produced - pasted into the .htaccess - which uploads as htaccess.txt renamed in the server ( edit in Fetch 2) nothin worked.

I pestered 1&1 and eventually a server support reply offered full URLs - they had the the test site details and wrote to suit it... it worked!

OK, the full website was in a folder - on a domain which holds my wife's craft site. The .htaccess went into that folder.

Fine I have a solution! But using the same format I renamed the page and I tried another page - nothing.

Deciding I needed a domain to test rather than a folder in another domain... I purchased a .co.uk domain so the redirects if the worked in the beta files... would simply copy over its the clients server - also with 1&1!

So the .htccess Redirect 301/ path is Root - Products > Abits > Bbits/old.html
the redirect is to:- Root - Products > Cbits > Dbits/new.html

Nothing works!

At times if I placed the .htaccess in the root.. I would get an error 500 page.
Ditto at times if I placed in a folder.

To be frank.. I have tried so many options and codes generated online by tools or used their codes in Tips etc,.

Google Webmaster tools forum had two replies and neither functioned and one was from a guru in Adelaide Aus - who runs a website and has written code making tools. He is puzzled why nothing works.

So I contact 1&1 support - "its not within our support remit to supply code or information other than that relevant to our products".
Again the confirm that my server allows use of .htacces.

The only problem I saw was some folders and pages have space between titles is a flder might be "Abits 1960" No "_" pr "-" and page might be bits 1960.html looking at the supplied code, I saw that he/she had added %20 were the files had a space.
Idiot thought I and promptly looked in code view...not showing in code view.

I duplicated the page and renamed it - and in code view added the "%20"
Resulted in Error 500! I move the .htaccess from root to folders ann had the same results.

So, if having spaces is going to prevent a redirect and adding "%20" is in effect renaming the the and kills the path.... how is that "repaired."

No an added problem is i am not allowed to give the factual website or URLs.

I did this - like an idiot - on a webbies forum and my then boss - got inundated with emails offering quotes to build his website because I was asking them how to do it!

At the moment - unless I can get this sorted, I plan to simple leave the unwanted pages off any internal menus - add a no index no cache meta and put a text link to the new page for anybody who may have a link showing in Google webmaster "links to".

In all the forum's and websites with the ask question type forum inclining hosting companies _ I have not found anybody with the same question!

Does .htaccess run OK in an Apache driven Virtual server?
vinnyvangogh is offline   Reply With Quote
Old 03-26-2015, 05:03 AM   #2
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

post the comple4te .htaccess file here so wec can see , if you are getting 500 codes then it is working but contains errors i would say
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 03-26-2015, 05:19 AM   #3
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

i point make sure there are no other htaccess files on the site incase there is an overide conflict
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 03-27-2015, 01:40 AM   #4
Ricky55
Ricky55's Avatar
 
Join Date: Oct 2005
Location: West Yorkshire, UK
Posts: 1,855
Default

a redirect should look like this

RewriteEngine On

redirect /old-file.html http://www.domain.co.uk/new-file.html
__________________
Qwerty Design

Check out my blog for web design insights.
http://www.qwerty-design.co.uk/
Follow me on Twitter: @QwertyDesignUK
Ricky55 is offline   Reply With Quote
Old 03-27-2015, 03:54 AM   #5
vinnyvangogh
 
Join Date: Aug 2009
Posts: 84
Default

As seen in my post -

My hosting is with 1&1 Uk - what was called shared hosting - is now called a virtual server. Its a Linux platform - but the main "engine" is Apache.
No cPanel - no access to the rewrite module.

Support ( a loose term!) say Apache is set at default - which means my server will run a .htaccess file with a Redirect 301/.

So far no variation has "worked".

Last edited by vinnyvangogh; 03-27-2015 at 04:06 AM..
vinnyvangogh is offline   Reply With Quote
Old 03-27-2015, 04:11 AM   #6
vinnyvangogh
 
Join Date: Aug 2009
Posts: 84
Default

Quote:
Originally Posted by edbr View Post
i point make sure there are no other htaccess files on the site incase there is an overide conflict
Just tries this version... not functioning.

The "company" does not exist. I have had the domain name for years after they closed down. I put some of their old information on a new
Responsive set of pages.

Used > company and process as folders holding the URLs
made it easier by using all lower case and no spaces or "-" or "_"

Redirect 301 /company/profile.html http://www.arco-studwelding.com/process/process.html

also tries full URLs

Redirect 301 /http://www.arco-studwelding.com/company/profile.html http://www.arco-studwelding.com/process/process.html
vinnyvangogh is offline   Reply With Quote
Old 03-27-2015, 04:27 AM   #7
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

post the whole page that you have (.htaccess)
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 03-27-2015, 04:33 AM   #8
vinnyvangogh
 
Join Date: Aug 2009
Posts: 84
Default

thats it.. nothing works so no point adding to it !

The redirect sits in a .txt file no space at the top of page.

1 blank line under it. Not sure if delay in updating changes in server apply.. the last three different version all bring up Internal Server Error

Edit.. its renamed .htaccess on the server
vinnyvangogh is offline   Reply With Quote
Old 03-27-2015, 04:42 AM   #9
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

rewriteEngine on
Redirect 301 /company http://www.arco-studwelding.com/process/
should redirect the entire folder
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 03-27-2015, 04:45 AM   #10
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

clearly .htaccess works if you are getting error. it is a mistake im the file for sure. make the file in notepad++ or similar save as .htaccess and upload using ftp, dont remname on site incase that is adding some hidden text
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:07 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com