# Problem making seo-friendly URLs with .htaccess

**URL:** <https://forum.kirupa.com/t/problem-making-seo-friendly-urls-with-htaccess/259583>\
**Category:** programming\
**Created:** [May 6, 2008, 9:26pm UTC](https://forum.kirupa.com/t/problem-making-seo-friendly-urls-with-htaccess/259583 "2008-05-06T21:26:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![shane\_c](https://avatars.discourse-cdn.com/v4/letter/s/3be4f8/32.png) [@shane\_c](https://forum.kirupa.com/u/shane_c)\
**Post date:** [May 6, 2008, 9:26pm UTC](https://forum.kirupa.com/t/problem-making-seo-friendly-urls-with-htaccess/259583/1 "2008-05-06T21:26:31Z")

</div>

First off, let me just say that I’ve never done this before, and know nothing about .htaccess or mod\_rewrite…

The page in question is located in the directory /test/babs/, and the .htaccess file is located in the site’s root.

Using a few tutorials, I’ve come up with this for the .htaccess:

```auto
# this is the initialization
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# these are the rewrite conditions
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# and finally, the rewrite rules
RewriteRule ^test/babs/([a-zA-Z0-9\-]+) /test/babs/index.php?page=$1 [L,QSA]

```

I’m trying to make it behave as if it were [mysite]/test/babs/index.php?page=modelunit, but when I attempt to go to [mysite]/test/babs/modelunit, it just shows me an unstyled version of the root site’s homepage ([mysite]/index.php).

Any help at all would be sweet… Thanks 🍺
