I've been playing with this quite a bit, since I have my sites set up to use
http://domainname.com
as the entry point for links sql.
In the past, I used a rewrite rule:
RewriteRule ^/$ /path/to/page.cgi?d=1 [R,L,NC]
Or
DirectoryIndex index.html index.htm /path/to/page.cgi?d=1 [R,L,NC]
after reading about the rewrite rules, I kept trying, and came up with?
RewriteEngine On
RewriteRule ^/$ /resources/ [R,L,NC]
RewriteRule ^/resources/?$ /resources/
<Directory /path/to/domainname.com/www/resources/>
Options All -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
RewriteRule (.*) /cgi-bin/LinkSQL/page.cgi?g=$1 [L]
AllowOverride All
Allow From All
</Directory>
To use this, you must actually create the empty directory /resources off your server root.
Then, you must put the above into your virtual server's httpd.conf *OR* into the .htaccess in your ROOT WEB SPACE directory. (ie: where your index.html file for your domain would be).
Then, in your Links config, under Setup->paths you need to change the BuildURL and BuildPath to point to the above directory.
You must also check the "update others" box, then go back and edit the Image_URL to point back to your Images directory.
What this does, is rewrite the '/' call to the dummy directory, which rewrites to the g=/ call to page.cgi, which then triggers the build_root_url mechanism to rewrite any additional calls to the /resources/ directory.
Because of some quirks in how the html is written out, you need both lines above to catch the variations in how "root" URL's are written and rewritten.
I have this working on several sites, and have been testing them out for awhile, and it seems to work. I just set up two more sites today, using the above rules, and they worked right off. (Which is more than I can say for the last few <G>).
EDIT: I added [R,L,NC] after the first rewrite rule, after finding that googke [adsense] *much* prefers having a targeted URL. If you use 'sites' you will get served ads that are about domains, unless the targeting on your page is awesome. That's better than PSA's. Experiment with other rewrite directories to see which targets your site best (eg: /sites/, /resources/, /candies/, etc)
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
http://domainname.com
as the entry point for links sql.
In the past, I used a rewrite rule:
RewriteRule ^/$ /path/to/page.cgi?d=1 [R,L,NC]
Or
DirectoryIndex index.html index.htm /path/to/page.cgi?d=1 [R,L,NC]
after reading about the rewrite rules, I kept trying, and came up with?
Code:
RewriteEngine On
RewriteRule ^/$ /resources/ [R,L,NC]
RewriteRule ^/resources/?$ /resources/
<Directory /path/to/domainname.com/www/resources/>
Options All -Indexes -FollowSymLinks +SymLinksIfOwnerMatch
RewriteEngine On
RewriteRule (.*) /cgi-bin/LinkSQL/page.cgi?g=$1 [L]
AllowOverride All
Allow From All
</Directory>
To use this, you must actually create the empty directory /resources off your server root.
Then, you must put the above into your virtual server's httpd.conf *OR* into the .htaccess in your ROOT WEB SPACE directory. (ie: where your index.html file for your domain would be).
Then, in your Links config, under Setup->paths you need to change the BuildURL and BuildPath to point to the above directory.
You must also check the "update others" box, then go back and edit the Image_URL to point back to your Images directory.
What this does, is rewrite the '/' call to the dummy directory, which rewrites to the g=/ call to page.cgi, which then triggers the build_root_url mechanism to rewrite any additional calls to the /resources/ directory.
Because of some quirks in how the html is written out, you need both lines above to catch the variations in how "root" URL's are written and rewritten.
I have this working on several sites, and have been testing them out for awhile, and it seems to work. I just set up two more sites today, using the above rules, and they worked right off. (Which is more than I can say for the last few <G>).
EDIT: I added [R,L,NC] after the first rewrite rule, after finding that googke [adsense] *much* prefers having a targeted URL. If you use 'sites' you will get served ads that are about domains, unless the targeting on your page is awesome. That's better than PSA's. Experiment with other rewrite directories to see which targets your site best (eg: /sites/, /resources/, /candies/, etc)
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.