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 :(

Edited by diafol

5 Years
Discussion Span
Last Post by cereal

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

Votes + Comments
cracking - thanks
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.