Question: I have multiple websites hosted on GoDaddy. I have one website in the root folder (`/`) and other websites on different folders under the root. 

* `www.mydomain.com` at the `/`
* `www.something.com` in folder `/something`

If a user types the URL `www.mydomain.com/something` it displays the contents of website `www.something.com`.

I want the user to be redirected to `www.mydomain.com` if the he/she types any sub directory name after `www.mydomain.com`.

I have the following in the `.htaccess` file in the root folder:

```
RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule ^ - [L]

```

Answer: 
@Scott's answer is right, your program actually does find all solutions. But it seems way too long for us to wait.

Instead, remove the `label/1` goal, which is the source of enumerating those solutions and add it at the end!

```
latin_(P,Vs) :-
    div2(P),
    transpose(P,X),
    div2(X),
    append(P,Vs).

 latin(P) :-
    latin_(P, Vs),
    labeling([], Vs).

```

The idea in constraint programming with finite domains is to delay actual enumeration (labeling) to a later point. In this manner, labeling can take into account all of the existing constraints. The easiest way to ensure that you are following this approach is to split your predicate into two parts. The actual core-relation (`latin_/2`) and the complete relation (`latin/1`). Often, it is possible to observer termination of the core-relation while this would be very costly for the complete relation.
Its not an "infinity loop", just a REALLY long one.

Suppose that `div2(P)` finds a proposed solution, which `div2(X)` then determines is not a solution. `div2(P)` will roll back & generate another solution by coming up with a new labelling for the *last row only*, at least until it has exhausted all ways to label the last row, then get a new labelling for the second-to-last-row, then *run through all of the possibilities for the last row again*. Roll that out through all 9 rows, and you have a LOT of combinations to go through, most of which look VERY similar.