0

Suppose that I have a wordpress installation on www.wp-project.com and I want redirect to a laravel webpage in the same domain, for example www.wp-project.com/laravel-project/login.

Now I have a wordpress project (wp-project) inside /var/www and a laravel project (laravel-project) inside /var/www/wp-project.

When I want to access laravel webpage I need to use the following url

www.wp-project.com/laravel-project/public/index.php/login.

I would like access as

www.wp-project.com/laravel-project/login

Without /public/index.php.

How can I achieve that? This answer doesn't work for me.

Thanks.

Community
  • 1
  • 1
RdlP
  • 1,366
  • 5
  • 25
  • 45
  • You can follow this [deploy laravel](http://blog.netgloo.com/2016/01/29/deploy-laravel-application-on-shared-hosting/) – Md Nozibulla Bashar Aug 27 '16 at 14:03
  • Your question shows that you do not understand HTTP server configuration. Learn about [Apache rewriting](https://httpd.apache.org/docs/2.0/misc/rewriteguide.html) and [Nginx rewrite rules](https://www.nginx.com/blog/creating-nginx-rewrite-rules/). All you need to do is make some rewrite rules for the Laravel URL requests. This answer may help you: [Laravel project next to Wordpress project (in public_html folder)](https://stackoverflow.com/questions/38716585/laravel-project-next-to-wordpress-project-in-public-html-folder) – Qevo Aug 27 '16 at 14:42

1 Answers1

0

Go to mainlaravelproject/public>>

a. .htacess

b. favicon.ico

c. index.php

d. robots.txt

e. web.config

1.cut these 5 files from public folder,and then paste on the main project folder that’s means out side of public folder… mainlaravelproject/files

2.Next after paste ,open index.php ,modify

•require DIR.'/…/bootstrap/autoload.php'; to

•require DIR.'/bootstrap/autoload.php';

modify

$app = require_once DIR.'/../bootstrap/app.php'; to

$app = require_once DIR.'/bootstrap/app.php';
Borna
  • 538
  • 4
  • 19