Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Static "Extra Pages"

Quote Reply
Static "Extra Pages"
I've been reading through many of the search engine tips and rewrite rules, but haven't found anything I can use. I've built pretty much every page in our new site as dynamic pages by using page.cgi?p=entrance&ID=1 as the page link. In this example, if you type in the homepage www.mypage.com, you're automatically redirected to http://www.mypage.com/...?p=entrance&ID=1 where entrance is the actual home page built using entrance.html inside of the templates/local directory.

Because most search engines won't allow a jump like this, or doorway page, I would like to somehow make links build this page and/or other "extra pages" via cron rather than being required to use a refresh/redirect method.

Any help is always appreciated,
Perl Hopefull
Quote Reply
Re: [stilton] Static "Extra Pages" In reply to
I always use;

RewriteRule ^p/(.*) /cgi-bin/links/page.cgi?p=$1

.... and Google *loves* that. So, basically;

http://www.yourdomain.com/p/advertisers
... would become;
http://www.yourdomain.com/cgi-bin/links/page.cgi?p=advertisers

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] Static "Extra Pages" In reply to
Hi Andy,

Thanks for info....you provide a lot of people with a tremendous amount of info in these forums. I've been working on understanding the rewrite rules and have gotten some to work, but not how I was hoping. Using .htaccess file in a directory /p off the root url, I have the following code:

RewriteRule ^p/(.*) /cgi-bin/page.cgi?p=$1 [L]
RewriteRule ^p/(.*).html /cgi-bin/page.cgi?p=$1.html [L]
RewriteRule ^p/(.*) /cgi-bin/page.cgi?p=$1&ID=1 [L]

My root index.html is currently using javascript to redirect to an extra dynamic page http://www.yourdomain.com/...?p=entrance&ID=1
with entrance.html in the default local templates folder.

Now if I type http://www.yourdomain.com/p/ it goes to the http://www.yourdomain.com/cgi-bin/page.cgi page like it should. But if I try to access the entrance.html template, I've been typing http://www.yourdomain.com/p/entrance I get an error message stating We don't seem to have a category by the name 'entrance'. Of course I don't have a category by this name, only the html template.

I'm only using dynamic pages, and have never built static pages...but these types of pages aren't built anyways....

As always, any help would be greatly appreciated,
Perl Hopefull
Quote Reply
Re: [stilton] Static "Extra Pages" In reply to
Hi. You may need to revise it a little;

Currently, it will try and...

1) make a general match of /p (FIRST)
2) See if a /p/foo.html exists
3) I'm not sure what this one is here for?

Code:
RewriteRule ^p/(.*) /cgi-bin/page.cgi?p=$1 [L]
RewriteRule ^p/(.*).html /cgi-bin/page.cgi?p=$1.html [L]
RewriteRule ^p/(.*) /cgi-bin/page.cgi?p=$1&ID=1 [L]

I would be enclined to give this a go;

Code:
RewriteRule ^p/(.*)\.html /cgi-bin/page.cgi?p=$1.html [L]
RewriteRule ^p/?$ /cgi-bin/page.cgi?p=$1 [L]

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] Static "Extra Pages" In reply to
Hi Andy,

Thanks again for your help...it seems to be working just as easily as a javascript redirect could ever do. I was wondering about the actual link that appears in the address bar. Is it possible to keep the url masked as a standard html link?
Perl Hopefull
Quote Reply
Re: [stilton] Static "Extra Pages" In reply to
No problem :)

Quote:
Is it possible to keep the url masked as a standard html link?

Is it just redirecting, and not remaining with the .html extension? I'm not that good with mod_rewrite... but normally [L] does the job, as [R] "redirects" (from my understanding of it, but I may be wrong).

Either way, [L] should work :|

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] Static "Extra Pages" In reply to
I was checking out some of the other info and using the [L] at the end works within different folders, but doesn't want to work in the root folder. It redirects but doesn't mask the URL. Now that I'm thinking, I may have actually seen someone else post you can't do it on the root folder.....I guess as long as it works everywhere else, I could just change my links as needed to point to the one folder instead...

Thanks!
Perl Hopefull
Quote Reply
Re: [stilton] Static "Extra Pages" In reply to
 
Perl Hopefull