PDA

View Full Version : Website Folder re-organize


retroman
05-03-2009, 04:56 PM
Hi Everyone,
I have an FQ website. I build the pages in the Kompozer WYSIWYG editor on my desktop, then upload them onto FQ with an FTP program. The site is a year old.

I'm not a programmer & have v. limited knowlege of html.

My site is about 20 pages. I will add about 40 more pages over the next few years.

I want to re-organize the pages into folders that make more sense than what I did when I started.

Reading the forum, I found there are ways to alert visitors what is happening, and redirect them to the proper page.

I need some step by step instructions on how to redirect pages or set up a custom 404 message with links to the new pages. (or the home page?)

The new structure will affect about 11 pages. Specifically I want to do the following:

http://13thmass.org/timelinehistory/1861.html
Will become:
http://13thmass.org/1861/1861.html

and,
http://13thmass.org/timelinehistory/harpersferry.html
will become
http://13thmass.org/1861/harpersferry.html

If anyone can help, simple step by step would be best.
The structural change will make a lot more sense as I add pages down the line.

Thanks all
Brad

johnfl68
05-03-2009, 09:24 PM
You probably want to do a redirect, which seems to be the best for search engines to find and update to the new pages.

You will need to create a text file called:

.htaccess

in your www folder. The easiest way to do this is using the file manager in CNC, using Create File.

In that file you want to put the following, one line for each of the pages that you want to redirect.

Example:

Redirect 301 /oldpage.html http://www.example.com/newpage.html

And with your examples:

Redirect 301 /timelinehistory/1861.html http://13thmass.org/1861/1861.html
Redirect 301 /timelinehistory/harpersferry.html http://13thmass.org/1861/harpersferry.html

You will need to add additional lines for each of the pages that you want to redirect. Anyone going to the old page will go straight to the new page, and if it is a search engine, it will see the 301 code and know that the page has moved permanently, and should update the link shortly.

Make sure you have an extra line return (Enter) at the very end of the file before you save it.

Your browser may cache the old version, and not see the redirect right away, each browser is different, so search "browser cache refresh" to find the way to reload a page fresh for your browser.

Any questions, please let us know!

John

retroman
05-04-2009, 01:30 AM
John,
Thank you. I did read up a bit on this so I think I can do it.
I'll just move one page first to make sure.
Thanks and I'll post here later how it turns out.

retroman
05-04-2009, 03:57 AM
John,
I created a
.htaccess
file in www folder.

I saved it.
I added a new directory for 1862 then moved the 1862.html page into the directory.
Off-line I re-edited my 1862.html page on my desktop with the wysiwyg editor.
I basically changed the links for that page.

Then I uploaded the edited 1862.html page into the new directory, over-riding the old page.
Then I edited the .htaccess file by typing:
Redirect 301 /timelinehistory/1862.html/http://13thmass.org/1862/1862.html

Now the web site is gone:eeww:

Should I reset everything, delete the .htaccess file and try starting over.
I read these files can be very tricky and destructive.
Brad

retroman
05-04-2009, 04:10 AM
John,
I found my mistake --
I didn't put a space between the old path and the new path.
The page I moved is loading properly. The new links don't work yet because I haven't moved the other pages, but I think I got it.
Thanks
Brad

johnfl68
05-04-2009, 09:33 AM
Brad:

Yes, the .htaccess can be tricky, there is a lot of power there. For what you are doing, the worst that can happen is the page does not show (but it is still there). Removing the lines added to the .htaccess puts you back were you were last.

Glad to hear it worked out for you!

John