I'm a new comer to .htaccess and I've discovered a couple of articles and I have attempted to really make it work, but keep failing.

I've the next during my .htaccess file:-

<IfModule mod_ssl.c>
    RewriteBase /mydomain.com/
</IfModule>
<IfModule !mod_ssl.c>
    RewriteBase /
</IfModule>
RewriteEngine On
RewriteRule ^([^.]*)$ index.cgi/$1 [L]

However, I wish to have the ability to visit mydomain.com/more-info, but this rule is which makes it mydomain.com/index.cgi/more-info

How do i make is to ensure that "more-info" is exempt out of this rule?

Thanks ahead of time.


So, Ulrich recommended the next...

#if not /more-info
RewriteCond %{REQUEST_URI} !^/more-info$ [NC]
RewriteRule ^([^.]*)$ index.cgi/$1 [L]

...however i get '404 Not Found'. The greater-info directory consists of index.htm, and when I turn this RewriteEngine off, it really works fine.

Give a RewriteCond Directive before

RewriteRule ^([^.]*)$ index.cgi/$1 [L]

that exempts /more-info. Something similar to -

RewriteCond %{QUERY_STRING} != /more-info

You might find some good examples here -> http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritecond

As below

#if not /more-info
RewriteCond %{REQUEST_URI} !^/more-info$ [NC]
RewriteRule ^([^.]*)$ index.cgi/$1 [L]

You can test this rule:

RewriteRule ^((?!more-info)[^.]*)$ index.cgi/$1 [L,NC]