Hello I've been employed by a while to get

website.com/$1/$2/$3
website.com/$1/$2

to create

website.com/public/index.php?module=$1&controller=$2&action=$3
website.com/public/index.php?controller=$1&action=$2

however i cannot appear to have it working

I'm trying this with two .htaccess files

.htaccess file situated in root/

<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes

   RewriteEngine on
RewriteRule !^public/ public%{REQUEST_URI} [L]

 </IfModule>

.htaccess file situated in root/public/

<IfModule mod_rewrite.c>
Options +FollowSymLinks
Options +Indexes

   RewriteEngine on
RewriteRule ^public/([^/]+)/([^/]+)/([^/]+)(/|)$ public/index.php?module=$1&controller=$2&action=$3
RewriteRule ^public/([^/]+)/([^/]+)(/|)$ public/index.php?controller=$1&action=$2

 </IfModule>

I presently get it redirecting towards the public/ but cannot try to alter the get variables

I solved it myself with this particular single .htaccess fine within the root

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)\.html$ $1.php [L]
RewriteRule !^public/ public%{REQUEST_URI} [L]
RewriteRule ^(.*)/([style|css|js|javascript|images|img|fonts|swf]+)/(.*)$ public/$2/$3 [L]

RewriteRule ^public/([^/]+)/([^/]+)/([^/]+)/?$ public/index.php?module=$1&controller=$2&action=$3 [L]
RewriteRule ^public/([^/]+)/([^/]+)/?$ public/index.php?controller=$1&action=$2 [L]

EDIT:

I've selected to maneuver my url pacing to my php since htaccess is really a nightmere with this kind of factor and when / Else claims are perfect... new code for individuals individuals concentrating on the same issue is:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ public/index.php/$1 [L]
RewriteRule ^(.*)/([style|css|js|javascript|images|img|fonts|swf]+)/(.*)$ public/$2/$3 [L]

ErrorDocument 404 /error404
ErrorDocument 403 /error403 

In root/public/.htaccess, matched up and rewrote pathes are in accordance with root/public, so that they don't begin with public, and also you mustn't attempt to match ^public:

RewriteEngine on
RewriteRule ^([^/]+)/([^/]+)/([^/]+)(/|)$ index.php?module=$1&controller=$2&action=$3
RewriteRule ^([^/]+)/([^/]+)(/|)$ index.php?controller=$1&action=$2

The not compulsory slash in the finish could be matched up with /?:

RewriteRule ^([^/]+)/([^/]+)/([^/]+)/?$ index.php?module=$1&controller=$2&action=$3

The Tag <IfModule mod_rewrite.c> only works within the apache-configuration.

Inside your .htaccess file you need to begin with

RewriteEngine On
RewriteBase /

then your conditions.