-2

I install Laravel and inside laravel public folder I install Wordpress inside folder wordpress.

Now I need to make a route at domain.com to public/wordpress folder...

How to do that?

I try:

Route::get('/', [function () {
return Redirect::to('/wordpress');
}]);

but this show me path in browser url ... domain.com/wordpress and I want only user to see just domain.com

Andrew
  • 2,128
  • 3
  • 24
  • 42

1 Answers1

2

What Laravel are you using?

This seems to be on the apache side of things, you can turn off the rewriting engine by adding this to your .htaccess file in your wordpress blog main directory (public/wordpress/.htaccess) so Laravel wont reroute it

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

  RewriteCond $1 !^(blog)

  # Redirect Trailing Slashes...
  RewriteRule ^(.*)/$ /$1 [L,R=301]

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

This works on my Laravel 5.0 install

William R.
  • 33
  • 5