# Bitwasp htaccess

**URL:** <https://www.ruby-forum.com/t/bitwasp-htaccess/231883>\
**Category:** NGINX\
**Created:** [September 4, 2014, 11:09am UTC](https://www.ruby-forum.com/t/bitwasp-htaccess/231883 "2014-09-04T11:09:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [September 4, 2014, 11:09am UTC](https://www.ruby-forum.com/t/bitwasp-htaccess/231883/1 "2014-09-04T11:09:42Z")

</div>

I’ve got a nice easy htaccess I need to convert to nginx.

RewriteEngine On  
RewriteBase /bitwasp

RewriteCond %{REQUEST\_URI} ^system.\*  
RewriteRule ^(.\*)$ /index.php/$1 [L]

# Checks to see if the user is attempting to access a valid file,

#such as an image or css document, if this isn’t true it sends the  
#request to index.php  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteRule ^(.\*)$ index.php/$1 [L]

# If we don’t have mod\_rewrite installed, all 404’s

# can be sent to index.php, and everything works as normal.

# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
