Question: I have a class named `DocumentRepository<T>`
with constructor

```
DocumentDbRepository(IDocumentCollectionName collectionName)

```

Where **IDocumentCollectionName** can be

```
CollectionNameFromClassName<T>

```

or 

```
CollectionNameFromString

```

And I am resolving this by 

```
container.RegisterType(typeof(IDocumentDbRepository<ClassA>), typeof(DocumentDbRepository<ClassA>))

container.RegisterType(typeof(IDocumentDbRepository<ClassB>), typeof(DocumentDbRepository<ClassB>))

```

So far so good.

But now I want to resolve **IDocumentCollectionName** to either `CollectionNameFromClassName` or `CollectionNameFromString` depending on the Generic Type.

So if I have `ClassA`, I want **IDocumentCollectionName** to resolve to `CollectionNameFromClassName<ClassA>`

And if i have ClassB, I want **IDocumentCollectionName** to resolve to `CollectionNameFromString` with a string parameter value

Answer: 
To use a requested URI unchanged, you must use a [`- (dash)`](http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewriterule)

> 
> **- (dash)**  
> 
>  A dash indicates that no substitution should be performed (the existing path is passed through untouched). This is used when a flag (see below) needs to be applied without changing the path.
> 
> 
> 

So your rule should look like

```
RewriteRule \.php$ - [L]

```

which means, when a URI ending in `.php` is requested, do nothing and stop further processing.
To exclude .php files from proxy redirect, you can use the following rule

```
RewriteRule ((?!\.php).*)$ http://localhost/$1 [P]

```