.htaccess rewrite to keep subdirectory as the root of the website

282
February 08, 2017, at 11:09 PM

I have server that contains different folders for different websites:

-- root
    --- automation
    --- thecorporation
-- .htaccess

its URL looks like this:

http://example.com:3333

I need to rewite the URL so when the user visits one of the pages like: http://example.com:3333/automation the automation folder would become the root, because now if a menu is clicked to access: http://example.com:3333/automation/contact php looks for files on the server but these sites are single page websites:

File does not exist: /var/www/html/automation/contact, referer: http://example.com:3333/automation

I really suck at regex and htaccess I would really appreciate some help. What I have tried so far was, but it does not work:

Options +FollowSymLinks 
RewriteEngine On
RewriteRule ^automation/?$ /index.php [NC,L]
Rent Charter Buses Company
READ ALSO
Show a specific table on click [php included] [on hold]

Show a specific table on click [php included] [on hold]

right here I have a code that shows a specific number of tables that differs depending on the data in the database, what I'm trying to do is to hide all those tables but their captions, and when i click a table's caption it shows the corresponding tableBut...

293
Getting multiple matches via regex

Getting multiple matches via regex

I want to retrieve a strings from a global string via Matcher & Pattern using REGEX

361
bootstrap popover with a link in table header - link doesn't work

bootstrap popover with a link in table header - link doesn't work

I have a table with popover on the table headerThe popover has a link and when I press it, it makes the table sorted and doesn't open the link

47
how to integrate a static landing page with its own design at root route using ui-router

how to integrate a static landing page with its own design at root route using ui-router

I am working on an angular js 1x application by using ui-router and have come up with a bottleneck since I am new to angular js ,so please forgive me if I sound silly

42