Member Avatar for diafol

Hi all. Am having a senior moment here.

I have a htaccess file thus:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]*)/*([^/]*)/*([^/]*)/*([^/]*)/*([^/]*)/*$ index.php?lang=$1&top=$2&middle=$3&bottom=$4&sub=$5 [L]

Which basically allows me to show

http://www.mysite.com/cy/tgau/cemeg-1/ for http://www.mysite.com?lang=cy&top=tgau&middle=cemeg-1

That's all well and good. However, I'm getting real problems directing my forms to /includes/login.php

This is probably an obvious issue to some of you, but I'm at a bit of a loss as to how to make an exception for the includes directory in the regex. Any advice gratefully accepted. As you can probably guess, my regex skills suck :(

If I understood the problem this should work:

RewriteRule ^(includes|and|other|directories) - [L]

place it right after RewriteEngine On the rules won't be applied in those directories. Bye! :D

commented: cracking - thanks +14
Member Avatar for diafol

You are an absolute star cereal. Thanks, worked like a charm.

you're welcome!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.