How to make a url like www.domain.com/app - laravel-5

I am trying to make a URL like www.mydomain.com/app.
but now there is an issue because Laravel contains an app folder in it so it is not becoming possible to make a url like this.
When I tried to make it I received this

you can change the folder name of app in laravel 5.
please see this thread for more information
How to Change App Folder Name in Laravel 5

Related

Configuring Laravel project in DirectAdmin server

I'm a newbie to Laravel projects but I need to have one accessible over the internet so I tried using DirectAdmin but whenever I go to my domain I get an index (pictures attached).
I renamed the Laravel 'public' folder to 'public_html', is that correct? Here is my file structure.
Here is what I get when I go to my assigned domain which isn't my website at all.
The webpage should look something like this
I also found a laravel app using Softaculous linked here (https://panel.freehosting.com:2222/CMD_PLUGINS/softaculous/index.raw?act=software&soft=419). Am I required to use this app?
At first, you need to learn about the laravel directory structure. You don't need to change the laravel public folder to public_html. I am not sure how the DirectAdmin server works. but if you see a laravel directory instead of serving an application it's might be a path-related issue in your server. your domain should serve your application public folder.
I just found a tutorial for the DirectAdmin server with laravel. that might help.

My site doesnt output laravel page...What shoud i do?

On browser, typing localhost/spa1/public or spa1.test doesn't output the laravel. I've been stuck and cant even proceed to starting my project because of this. I really need help!!
The output supposedly :
enter image description here
The app key is :
APP_KEY=base64:lEpLqsi9GOqaz6eyu5VaTft0UOfj7u+A4LAie6LEJoc=
I'm using xampp on windows
My problem is y it doesnt output the Laravel page like the Google one?
In your terminal, you should start the server.
php artisan serve
This will create a home URL like localhost:8000 and read index.php file in the public folder.
BTW, the image you share is Laravel's default home page. If you look at welcome.balde.php file, you can see the same content there. So your app is running. But it's not a good idea to display your app without artisan serve.
Your code is fine, and this is how the home page looks like in Laravel 8. Because the home page you're talking about was in Laravel 7 & below. And from Laravel 8 onwards, the default home page of Laravel 8 is updated and looks like the one you're getting right now.

How to load an codeigniter application by using different url

Now I am developing an application by using CodeIgniter framework. In this application, there is a section which name account setup. By using this section we can create multiple accounts. As an example, accounts name are abc, bca or anything. And Suppose my site URL is: www.xyz.com (base_url) Then we need to access the site by the domain name and also domain name with account name like bellow:
www.xyz.com
www.xyz.com/abc/
www.xyz.com/bca/
www.xyz.com/anything/
For More clear, URL pattern will be:
www.xyz.com/dashboard/index
www.xyz.com/abc/dashboard/index
www.xyz.com/bca/dashboard/index
How can we do it? I need your suggestion.
Yes it's Possible through codeigniter Routs.
Go to application\config Open a file which Name is routes.php
you can call the controller functions see in code example
example
$route['new_project'] = "controller/function";
when you hit your website url like this www.xyz.com/new_project it will go to your mention controller and function.
see the documentation of routs CodeIgniter URI Routing
example 2:
$route['account/(.*)'] = "controller/function";
Now we you redirect your url like this
redirect('account/'.$name_var.'');
Now your url look like this.
www.xyz.com/account/name_of_logged_in_user
Also you can use this like this.
$route['(.*)/dashboard/index'] = "controller/function";
And then you can call it like this.
redirect(''.$name_var.'/dashboard/index');
And from this code your output url show something like this.
www.xyz.com/name_of_logged_in_user/dashboard/index
Hope it will help you if any question add comment
There are many way to do it.
1) Domain alias if you want to run same script with different domain.
2) if you want to run same script with sub domain then you can do it from Cpanel
3) If you want to run same script with different folders in same domain then you need to use htaccess

Laravel on a directory, links e.g. login link does not work

I have uploaded my Laravel app unto a directory under the public folder on my domain,
html_docs/public/store
where 'store' is the folder of my Laravel App. My main domain pointed at 'html_docs/public', please check my laravel app here "https://www.dinhi.org/store/". As you can see, when you click the "sell with us" or "login" on the top header, it returns
Not Found
The requested URL /store/dashboard/login was not found on this server.
I have set up to in my '.env' and in my 'config/app.php' the right url like "https://www.dinhi.org/store/" but still not working, any ideas, help please?
PS: I'm on Laravel 5.3 and I'm using Hesto Multi Auth. In my local, this issue does not exist like everything is good and working.
Laravel is not meant to be installed completely into the document root of your server. Actually, every folder of your laravel application except the public folder should be inaccessible from the web.
Your exposing yourself to a security risk here, since everybody could access every file of your app, including potential .env files with database credentials and the likes.
Cheers
Christoph

laravel 5 showing directory structure in vps

I have installed Laravel 5 in my vps form the instruction given in the "http://laravel.com/docs/5.1" link. It installed successfully but when I go to http://myipaddress/laravel it showing me the directory structure. I had check my php.ini file also for the "mod_rewrite" and it is showing in the loaded package, so where I am going wrong.
Access the public folder. That's where all your output content goes. http://myipaddress/laraval/public/
Edit:
One other thing. Don't name your project "laravel" as it may cause naming problems. Try to create a new project with a different name.

Resources