1
votes

I'm working on a local version of a website developed with Laravel. I have a URL like : http://localhost/s/SEO/userinstall which returns a 404 error. In the app/Http/routes.php , I tried the following but I'm still getting the same error :

Route::get('userinstall', 'InstallController@userinstall');
Route::post('userinstall', 'InstallController@saveUser');

Then I tried

Route::get('s/SEO/userinstall', 'InstallController@userinstall');
Route::post('s/SEO/userinstall', 'InstallController@saveUser');

I checked the AllowOverride directive in the Apache configuration file and it seems to be fine :

<Directory />
   AllowOverride All
</Directory>

I'm using the defaut Laravel .htacess file. Any idea how I can fix this?

Thanks

1
@PhInside I have no "public" folder in my installation.user1319182
More details and information are obviously needed. What does the vhost configuration look like? What's the path for your app? Why doesn't your Laravel installation have a public folder?user2479930
@JoachimMartinsen I'm on a local computer running OpenSUSE. The absolute path to the application is /srv/www/htdocs/s/SEO. I'm updating the post.user1319182

1 Answers

1
votes

By looking into your URL, http://localhost/s/SEO/userinstall

I am assuming s->SEO are directories under an apache root directory and because that you have to use "s/SEO/userinstall" in Route::get('s/SEO/userinstall', 'InstallController@userinstall');

You should Add the Apache Configuration of your website path "../s/SEO" assign a specific domain name. Such as http://sandbox.local such that you could access the site from http://sandbox.local/userinstall

That way, you could access the route by using

Route::get('userinstall', 'InstallController@userinstall');

Try to google it, to get an idea about, how you could setup your project to access through local domain.

Here is the URL which might help you. http://headsigned.com/article/setting-up-local-development-domain-with-apache-vhosts