# Mapping Url using htaccess

**URL:** <https://discourse.laminas.dev/t/mapping-url-using-htaccess/1927>\
**Category:** Components & MVC\
**Tags:** zf1\
**Created:** [November 3, 2020, 7:28pm UTC](https://discourse.laminas.dev/t/mapping-url-using-htaccess/1927 "2020-11-03T19:28:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anujchauhan](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@anujchauhan](https://discourse.laminas.dev/u/anujchauhan)\
**Post date:** [November 3, 2020, 7:28pm UTC](https://discourse.laminas.dev/t/mapping-url-using-htaccess/1927/1 "2020-11-03T19:28:18Z")

</div>

Hello ,

I hope , you are doing well ,

I have a confusion that i am trying to map a url to zend controller using htaccess. but it is showing my that invalid controller name .

My htaccess code is here .

```auto
SetEnv APPLICATION_ENV developmentangular
php_value "short_open_tag" "on"
php_value "session.cache_expire" "0"

RewriteEngine On
RewriteRule ^V2AWS/webservices/(.*) webservices/$1?apiVersion=V2AWS [L,QSA]
#RewriteRule ^appbuilder/creator-software$ builder/creator-software.php
#RewriteRule ^appbuilder/creator-software/$ builder/creator-software.php
RewriteRule ^show/billing/(.*) /billing/index/appId/$1 [QSA,L] 
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
php_flag magic_quotes_gpc 0
php_flag register_argc_argv 1

```

Which is inside the public folder.

My url is `http://localhost.billing/show/billing/ef5657b355e2` and mapping url is `http://localhost.billing/billing/index/appId/ef5657b355e2`. but i am getting the error that controller name in invalid . i am attaching the screenshot in the attachment section.

 ![Screenshot 2020-11-04 at 12.57.22 AM](https://canada1.discourse-cdn.com/flex032/uploads/zendframework/original/1X/69929a83a376083a62e313e6b185429b7a00906f.png)

What i am doing wrong ,please guide me about this issue .

Thanks

---

<div class="post-metadata">

**Author:** ![froschdesign](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.laminas.dev/froschdesign/32/38_2.png) [@froschdesign](https://discourse.laminas.dev/u/froschdesign)\
**Post date:** [November 3, 2020, 7:45pm UTC](https://discourse.laminas.dev/t/mapping-url-using-htaccess/1927/2 "2020-11-03T19:45:22Z")

</div>

Hello and welcome to our forums! 😃

First you are using the Zend Framework with version 1 but this version is dead since 2016!

> [@anujchauhan](#):
>
> I have a confusion that i am trying to map a url to zend controller using htaccess.

Is there a special reason why you want to do it this via htaccess?

> [@anujchauhan](#):
>
> ```auto
> RewriteRule ^show/billing/(.*) /billing/index/appId/$1 [QSA,L]
> 
> ```

Remove this line and [define the route](https://framework.zend.com/manual/1.12/en/zend.controller.router.html#zend.controller.router.routes.standard) in your application.

* * *

But again: **ZF1 is dead** and has not been supported for years!

---

<div class="post-metadata">

**Author:** ![anujchauhan](https://avatars.discourse-cdn.com/v4/letter/a/ba9def/32.png) [@anujchauhan](https://discourse.laminas.dev/u/anujchauhan)\
**Post date:** [November 4, 2020, 4:31am UTC](https://discourse.laminas.dev/t/mapping-url-using-htaccess/1927/3 "2020-11-04T04:31:44Z")

</div>

I am trying this for my learning . i want to know that how it is possible to get this using htaccess with same version.

Thanks
