Question: First of all , I clarified with my hosting company and they have verified that Allow Override setting is enabled.

Second if I write garbage value in .htaccess file, then I get "Internal Server Error" which further proves that .htaccess is not skipped.

I am trying to do this
Input : all/3
output: all.php?id=3

I wrote following in .htaccess file, which I copied from a tutorial site.

```
# Enable Rewriting  
RewriteEngine on  
# Rewrite user URLs  
#   Input:  user/NAME/  
#   Output: user.php?id=NAME  
RewriteRule ^all/(\w+)/?$ all.php?id=$1

```

all.php file

```
<?php
echo $_GET['id'];
?>

```

Now if I enter `localhost/all/3` then I get 3 displayed.

If i enter `www.mydomain.com/all/3` then the page is blank.

Also I have only the above code in .htaccess file and nothing more or less. So why I am getting different behaviour in localhost and in my server?

Answer: 
you can make use of list comprehension for this:

```
In [71]: A = [['A',[1,2,3]],['D',[3,4]],['E',[6,7]],['F',[1]],['G',[7,6,5,4]]]

In [72]: [[x[0],x[1][:2]] for x in A]
Out[72]: [['A', [1, 2]], ['D', [3, 4]], ['E', [6, 7]], ['F', [1]], ['G', [7, 6]]]

```
use `map` on each item of sublist, because `'A'[:2]` will return `'A'` only.

```
In [115]: A = [['A',[1,2,3]],['D',[3,4]],['E',[6,7]],['F',[1]],['G',[7,6,5,4]]]

In [116]: [map(lambda x:x[:2],x) for x in A]
Out[116]: [['A', [1, 2]], ['D', [3, 4]], ['E', [6, 7]], ['F', [1]], ['G', [7, 6]]]

```