Question: I have a domain name `domain.com` and some folders inside it. When i am accessing the folders inside this domain i can access the folder like this.

```
http://www.domain.com/folder

```

I want to convert this url with htaccess to

```
http://www.folder.domain.com

```

I would like to have similar urls for all folders so its a wildcard entry.
Please tell me how can it be done with htaccess.

```
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain.com
RewriteRule ^(.*)$ http://subdomains.domain.com/$1 [L,NC,QSA]

```

Answer: 
well, the answer is quite simple... I was not aware that I need to close every single if separately. So, here is the working code:

```
${if_existing /proc/net/route wlan0}${color grey}wireless\    
${else}\
${if_existing /proc/net/route eth0}${color grey}wired\
${else}\
${color grey}no network\
${endif}\
${endif}

```
If it can be of any help, here is the structure of my usb conky (4 different usb and a "no usb" condition) :

```
${if_existing /media/me/1}1${fs_used_perc /media/me/1}%${else}\
${if_existing /media/me/2}2${fs_used_perc /media/me/2}%${else}\
${if_existing /media/me/3}3${fs_used_perc /media/me/3}%${else}\
${if_existing /media/me/4}4${fs_used_perc /media/me/4}%${else}\
No Usb${endif}${endif}${endif}${endif}

```