Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Best way to change the top level category.

Quote Reply
Best way to change the top level category.
I need advise on the best way to change the top level category.

The build directory structure I have now is “mysite.com/pages/” I want to change it to “mysite.com/changed/”.
I know I can change the build directory in setup and copy the sub cats to the new top level cat, that’s not a problem.

Its the search engines and links back to the site that will still point to “mysite.com/pages/”.

Would it be best to do a complete static build to “/pages/” and then change to “/changed/” with another build ? leaving the original in place.
It seems like a lot of wasted server space or would a rewrite rule be the simplest method.

Your comments are welcome.

Thanks

Regards

minesite
Quote Reply
Re: [minesite] Best way to change the top level category. In reply to
Your best bet is to edit the paths in Setup > Paths and URLs (remember to tick the checkbox at the bottom of the page), and then setup a .htaccess file in your old folder.. something like;

Code:
RewriteEngine On
RewriteRule ^pages/(.*) changed/$1 [L]

This should just redirect visitors who are visiting the old pages, to the new ones, without loosing any search engine rankings (Google should treat is as if you have the pages at the same place).

For example;

http://www.yoursite.com/pages/test/index.html
http://www.yoursite.com/changed/test/index.html

Hope that helps :)

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Best way to change the top level category. In reply to
Ok Andy, that's what I was hoping.

Thanks.

Regards

minesite
Quote Reply
Re: [minesite] Best way to change the top level category. In reply to
BTW, it will only work for generated pages, and not the cgi-scripts. If you want to move the cgi-bin folder, then you need to edit the paths in pretty much all the .cgi scripts.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Best way to change the top level category. In reply to
No, its only the static built pages.

Regards

minesite
Quote Reply
Re: [minesite] Best way to change the top level category. In reply to
You realize in one of the other threads, there is a set of rules that will let you write out dynamic pages so that they look static to the user and the search engines.

That way you don't need to build pages, and they are always up to date when the search spiders come crawling.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Best way to change the top level category. In reply to
Yeah, I saw that but I find my site is faster in static than dynamic.
I use cron to rebuild every 3 days so thats close enough for the traffic I get.
I will utilize the rewrite for the Forum though.

Thanks for the reply.

Regards

minesite
Quote Reply
Re: [Andy] Best way to change the top level category. In reply to
Hi

I finally got around to trying this but get an error page with the following error in the logs.
“Directory index forbidden by rule: mysite.com/www/mining/pages/”

I placed the htaccess file with the following rule into the /pages/ directory.
RewriteEngine On
RewriteRule ^pages/(.*) Suppliers/$1 [L]

mysite.com/www/mining/Suppliers/ directory exists which is built by LinksSQL, it has the index.shtml in it.

Any pointers to the problem.

Regards

minesite

Last edited by:

minesite: Jul 9, 2004, 7:33 PM
Quote Reply
Re: [minesite] Best way to change the top level category. In reply to
CrazyGetting closer.


This rule seems to work to a point
RewriteEngine On
RewriteRule ^(.*)$ /mining/Suppliers [L]

But will default all calls made to the /mining/pages/ directory to /mining/Suppliers/

What I would like it to do is to mirror to the directory being called less the /pages/ i.e.
http://mysite.com/www/mining/pages/A >> http://mysite.com/www/mining/A
http://mysite.com/www/mining/pages/B >> http://mysite.com/www/mining/B
etc etc

TIA

Regards

minesite

Last edited by:

minesite: Jul 10, 2004, 1:39 AM