# Htaccess woes

**URL:** <https://forum.kirupa.com/t/htaccess-woes/200030>\
**Category:** Uncategorized\
**Created:** [September 8, 2006, 3:18am UTC](https://forum.kirupa.com/t/htaccess-woes/200030 "2006-09-08T03:18:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hojo](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@hojo](https://forum.kirupa.com/u/hojo)\
**Post date:** [September 8, 2006, 3:18am UTC](https://forum.kirupa.com/t/htaccess-woes/200030/1 "2006-09-08T03:18:37Z")

</div>

Hey folks,  
My site sends a 200 status code rather than the 404. All non-recognized urls are taken over by the rewrite and sent to the index.

I currently have in my htaccess:

```auto
:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php

```

and read I need to add

```auto

Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^yoursite.com [NC]
RewriteRule ^(.*)$ http://www.yoursite.com/$1 [L, R=301]

```

and

```auto

Options +FollowSymLinks
RewriteEngine on
# index.php to /
RewriteCond %{THE_REQUEST} ^[A-Z]{3, 9}\ /.*index\.php\ HTTP/
RewriteRule ^(.*)index\.php$ /$1 [R=301, L]

```

From what I know, the first code permits for my php files to be read properly. The second redirects inproper inquiries such as http//dotcom and wwwdotcom to http//wwwdotcom. The last sends http//wwwdotcom/indexdotphp to http//wwwdotcom.

When trying to do this, I’m given an internal 500 error. I listed RewriteEngine on just once, and pasted the rest subsequently under.

Any help is most appreciated, as I’ve been struggling with this issue for some time now. Thanks for reading!
