Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Modifing the ?

Quote Reply
Modifing the ?
Is there a way to exchange the ? with some other character that would be more search engine friendly? Maybe use something like /p/?

Maybe change

/page.cgi?d=1

To

/page.cgi/p/d=1

or something like that?
Quote Reply
Re: [jgkiefer] Modifing the ? In reply to
You could try using mod_rewrite, or just .htaccess stuff... but is there any particular reason why you want to do this? All the major spiders (such as google.com), spider ? & etc all fine ;-)

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] Modifing the ? In reply to
Will they spider links going thru jump.cgi, too?



sun
Quote Reply
Re: [Andy] Modifing the ? In reply to
Thanks!
Quote Reply
Re: [jgkiefer] Modifing the ? In reply to
Just my 2 cents.........

I'm still trying to figure out why everyone insists that Google indexes the dynamic pages just as they do the static. In my experience it's not true. I've got both static and dynamic pages running and Google indexes vey few dynamic pages. Seems that the only ones they like are 'page.cgi?page=something' nothing else is indexed for me.

Maybe it's because I do have static pages indexed but, everything with with a page.cgi?d=1&blah=blah&.. doesn't get indexed for me.

Anyone have a explaination?

Regards,
Clueless

Last edited by:

Clueless: Oct 16, 2003, 9:53 PM
Quote Reply
Re: [sun112] Modifing the ? In reply to
In Reply To:
Will they spider links going thru jump.cgi, too?

I believe so.

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: [jgkiefer] Modifing the ? In reply to
Using mod_rewrite, it's very easy to make Links SQL dynamic mode look like static URL's. Simply add:

RewriteEngine on
RewriteRule /static/?(.*) /cgi-bin/links/page.cgi?g=$1 [L]

and that's it. Now going to http://yoursite/static/ will display pages via page.cgi, but look exactly like static url's.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Modifing the ? In reply to
Could you provide a bit more detail on how this is done Alex?
Quote Reply
Re: [jgkiefer] Modifing the ? In reply to
You need to add the lines to your httpd.conf if you are on a dedicated server or your .htaccess file if not. Try searching the forum for rewriterule for more information.
Quote Reply
Re: [afinlr] Modifing the ? In reply to
Thanks!
Quote Reply
Re: [jgkiefer] Modifing the ? In reply to
If you aren't on a dedicated server, you can try just placing a .htaccess file in the directory you want. i.e. if you want:

http://yoursite/static/

then make a directory called static, and place in it an .htaccess file with:

RewriteEngine On
RewriteRule (.*) /cgi-bin/links/page.cgi?g=$1 [L]

and that's it. If it doesn't work, ask your ISP to enable .htaccess files in that directory.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Modifing the ? In reply to
In Reply To:
If you aren't on a dedicated server, you can try just placing a .htaccess file in the directory you want. i.e. if you want:

http://yoursite/static/

then make a directory called static, and place in it an .htaccess file with:

RewriteEngine On
RewriteRule (.*) /cgi-bin/links/page.cgi?g=$1 [L]

and that's it. If it doesn't work, ask your ISP to enable .htaccess files in that directory.

Cheers,

Alex


Hi Alex,

Above rewrite seems to works when I use it in the /static/ folder, however when I move the file to root folder with the hopes that www.domain.com/ will show the main page of the directory I am getting 500 Internal Server Error, any idea how to take care of this?

Content in .htaccess file

RewriteEngine On
RewriteRule (.*) /cgi/page.cgi?g=$1 [L]


thanks.

Vishal

Vishal
-------------------------------------------------------

Last edited by:

NeedScripts.Com: Feb 18, 2004, 4:27 AM
Quote Reply
Re: [NeedScripts.Com] Modifing the ? In reply to
What's the error say in the error log? Sounds like /cgi is inside of your document root. Also, you need to make sure your images aren't rewritten to page.cgi as well. Something like:

RewriteEngine On
RewriteCond %{REQUEST_URI} !/images/
RewriteCond %{REQUEST_URI} !/cgi/
RewriteRule (.*) /cgi/page.cgi?g=$1 [L]

However, a simpler solution might be to just put:

DirectoryIndex index.html index.htm /cgi/page.cgi

into the root folder. That way going to http://domain/ will pull up /cgi/page.cgi, and then all other URL's will be http://domain/static/Category/.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Modifing the ? In reply to
Hi Alex,

Thanks for reply Smile

It seems like it is not possible (at least I don't think it is) to use mod_rewrite while using the root dir for the index page. So I might just try some sort of redirect from root page to /static/ page and get the thing working.

Thanks for the wonderful solution :)

Vishal

Vishal
-------------------------------------------------------