Dan Ovidiu Boncut
Dan Ovidiu Boncut

Reputation: 3165

Rewrite every url to go to directory

I have a folder structure like this

/first/second/{application}

And I would like that trough htaccess to load content from application without those two directories to appear. So www.domain.com would load www.domain.com/first/second and www.domain.com/something/anything would load www.domain.com/first/second/something/anything

I tried with RewriteRule ^(.*)$ /first/second/index.php/$1 [L] in htacces in root folder but without any success.

Upvotes: 1

Views: 34

Answers (1)

Max P.
Max P.

Reputation: 5679

RewriteEngine on RewriteCond %{REQUEST_URI} !^/first/second/ RewriteRule ^(.*)$ /first/second/$1

Upvotes: 1

Related Questions