Reputation: 2538
I have a wordpress site set up domian.com Now i made a folder called scheduler and installed a laravel application. Inside my laravel application i have a .htaccess with the following inside the scheduler folder
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* public/index.php [QSA,L]
</IfModule>
and the following htaccess is the main server folder where the wordpress site lives
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
what i need to happen is domian.com/scheduler or domain.com/scheduler/..... should point to the scheduler directory and run the laravel app what am i doing wrong what do i need to add into the main directory htaccess
Upvotes: 0
Views: 1867
Reputation: 51
In cpanel or your hosting provider , go to domains, then click on create a new domain, after clicking on this in domain field write your subdomain and in document root field , write public html/scheduler , now you can use this subdomain to access our routes.
Upvotes: 0
Reputation: 48711
Add another rewrite rule with last L
flag:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^scheduler($|/) - [L]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Upvotes: 1