Gossamer Forum
Quote Reply
Htaccess exclude
Hello!

Im testing on localhost a dynamic version of my site.
Im having a little trouble with htaccess.
I have htaccess running great for the most part. But I need to exclude a directory so that page.cgi doesnt give me a category error.

I have tried answers that i found in other forums but they arent working.

Its basicly an exclude from the rewrite rule for category "miembros" which is not part of GLinks.

Ive tried adding an .htaccess to the mimebros directory but that isnt working either.

Can anyone help me get it right please.

Juan Carlos
Quote Reply
Re: [Gorospe] Htaccess exclude In reply to
Hi,

You probably just need a RewriteCond, to tell it not to process:

Code:
RewriteCond %{REQUEST_FILENAME} !miembros
RewriteRule (.*)/? /cgi-bin/page.cgi?$1 [L]

The bit in bold needs to be before ALL of your RewriteRules, so that it knows to ignore them in all cases

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] Htaccess exclude In reply to
Didnt work... I have Glinks and a wordpress. Glinks is detecting the members folder as its own.
Ive adopted the wordpress htaccess and am in the process of modifing it. Starting with glinks.
Maybe its the order of things that is not working?

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !cgi-bin
RewriteCond %{REQUEST_FILENAME} !miembros
RewriteCond %{REQUEST_FILENAME} !members
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule (.*)/? /cgi-bin/page.cgi?$1 [L]
</IfModule>

Thanks Andy
Quote Reply
Re: [Gorospe] Htaccess exclude In reply to
Mmm, how about:

Code:
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !cgi-bin
RewriteCond %{REQUEST_FILENAME} !miembros
RewriteCond %{REQUEST_FILENAME} !members
RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !cgi-bin
RewriteCond %{REQUEST_FILENAME} !miembros
RewriteCond %{REQUEST_FILENAME} !members
RewriteRule (.*)/? /cgi-bin/page.cgi?$1 [L]

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!

Last edited by:

Andy: Aug 28, 2013, 9:06 AM
Quote Reply
Re: [Andy] Htaccess exclude In reply to
Going to /miembros takes me to front page index (wordpress).
Going to any wordpress link converts everything to glinks.

So wordpress is now front page and everything else is glinks.
Quote Reply
Re: [Gorospe] Htaccess exclude In reply to
Mmm, how about the modified version above?

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] Htaccess exclude In reply to
Home page is wordpress. All links within home page of wordpress take you to glinks home page.

Gossamers cgi-bin/admin seems to be OK.
cgi-bin/page.cgi seems to be OK.
/miembros seems to be OK.
/wp-admin and everything within seems to be OK.
Quote Reply
Re: [Gorospe] Htaccess exclude In reply to
Hi,

Mmm ok - this is where it helps to have your blog stuff in a sub-domain :) So just to be sure, you want the homepage to be the blog... whilst the rest should stay as it was?

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] Htaccess exclude In reply to
Yeah, wordpress has many many tools to promote and grow the site as to glinks is an awesome directory tool.
So the main site is wordpress and glinks would be an wrongly called "add on" to the site.

I tried installing wp in a directory but it just didnt seem right as it was the actual site...
But if thats the way to go, I guess Id have to live with it.

What do you think?
Quote Reply
Re: [Gorospe] Htaccess exclude In reply to
Hi,

Yeah. Personally,I would put it into a sub-folder.. and then for the root page, just have a rewrite rule:

Code:
RewriteRule ^/?$ /blog/index.php [L]

...or wherever you have it.

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] Htaccess exclude In reply to
As always Ill take your advice.

Thanks.