I have a very specific configuration on my site. In the root there is a .htaccess file (1) and index.php from laravel which handles everything non wordpress. There is a folder mysite where wordpress is installed and it has .htaccess file (2) to support permalinks. So if I go to / of my site, I want Laravel to handle it, and when I go to /mysite, I want wordpress to be displayed. This all works fine. Now I just want to hide /mysite from URL in the browser? Is that possible? I cannot move index.php from /mysite to root as that would clash with one from laravel.

So I want links like: http://appsforce.front/mysite/services/applications/ to be displayed as: http://appsforce.front/services/applications/

.htaccess (1)

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On
Options -Indexes
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

Order allow,deny Deny from all

.htaccess (2) - WordPress in mysite folder

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /mysite/index.php [L]

</IfModule>
# END WordPress

0 Answers