Over the years, since the version 1.x betas, i've played with rewriting the http://domain.com format, into the home.html template of Links SQL.
I've learned a few things ,and in light of recent discussions I'll pass a few on.
The format I use is:
RewriteRule ^/$ /empty_dir/ [R,L,NC]
RewriteRule ^/empty_dir/?$ /empty_dir/ [L,NC]
<Directory /var/home/path/to/empty/empty_dir/>
Options All -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
RewriteRule (.*) /cgi-bin/LinkSQL/page.cgi?g=$1 [L]
AllowOverride All
Allow From All
</Directory>
First, you need to set up the first two rewrite rules, then create an EMPTY directory, in the public tree, that is used to force the rewrite. The above <directory> directives are in my httpd.conf file, but can be used in an .htaccess file.
The red R is optional, and I'll explain it later. The blue "/" is _MANDATORY_ and this line prevents Links from generating "We do not have a category..." and printing out your path name as an error.
The green [L,NC] _seems_ to be a good idea, but it doesn't always work, and I'm not sure why.
Back to the first rewrite rules.
The first rule rewrites your domain name to the empty directory, which forces _everything_ to pass through the page.cgi file.
When you add an R to the flags, you will get a visible URL :
http://domain.com/empty_dir/
This often shows _NO_ page rank, and gives people ulcers. If you add the R, you'll see:
http://domain.com/
That "appears" better to most people, but I did some checking on sites I had running for at least 6 months to a year, or more, and when I changed the [R,L,NC] that was showing /empty_dir or /empty_dir in the URL -- with a PR of 0, to [L,NC], when I looked at the http://domain.com/ resulting url, some pages were as high as a 6. *SO* google ignored the rewrite completely, and ranked the incoming URL, anyway.
How this translates into search engine listing, I don't know, but I'd take a PR of 6 any day <G>
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
I've learned a few things ,and in light of recent discussions I'll pass a few on.
The format I use is:
Code:
RewriteRule ^/$ /empty_dir/ [R,L,NC]
RewriteRule ^/empty_dir/?$ /empty_dir/ [L,NC]
<Directory /var/home/path/to/empty/empty_dir/>
Options All -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
RewriteRule (.*) /cgi-bin/LinkSQL/page.cgi?g=$1 [L]
AllowOverride All
Allow From All
</Directory>
First, you need to set up the first two rewrite rules, then create an EMPTY directory, in the public tree, that is used to force the rewrite. The above <directory> directives are in my httpd.conf file, but can be used in an .htaccess file.
The red R is optional, and I'll explain it later. The blue "/" is _MANDATORY_ and this line prevents Links from generating "We do not have a category..." and printing out your path name as an error.
The green [L,NC] _seems_ to be a good idea, but it doesn't always work, and I'm not sure why.
Back to the first rewrite rules.
The first rule rewrites your domain name to the empty directory, which forces _everything_ to pass through the page.cgi file.
When you add an R to the flags, you will get a visible URL :
http://domain.com/empty_dir/
This often shows _NO_ page rank, and gives people ulcers. If you add the R, you'll see:
http://domain.com/
That "appears" better to most people, but I did some checking on sites I had running for at least 6 months to a year, or more, and when I changed the [R,L,NC] that was showing /empty_dir or /empty_dir in the URL -- with a PR of 0, to [L,NC], when I looked at the http://domain.com/ resulting url, some pages were as high as a 6. *SO* google ignored the rewrite completely, and ranked the incoming URL, anyway.
How this translates into search engine listing, I don't know, but I'd take a PR of 6 any day <G>
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.