how to remove public from url

  • please help how to remove public from url i have given .htacess file in root folder and in that file i have written

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(.*)$ public/$1 [L]

    but its not working now what to do

  • Global Moderator


    This is not a question about Asgard.
    Try googling for how to setup Laravel 5 server or laravel 5 how to remove public from url.

  • ya i have tried that also but not working please elaborate more .....

  • Asgard has this in the public/.htaccess file

    <IfModule mod_rewrite.c>
        <IfModule mod_negotiation.c>
            Options -MultiViews
        RewriteEngine On
        # Redirect Trailing Slashes...
        RewriteRule ^(.*)/$ /$1 [L,R=301]
        # Handle Front Controller...
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule ^ index.php [L]

    This shouldn't need to be changed.

    In your httpd.conf file about ... about line 165 you should see

    LoadModule rewrite_module libexec/apache2/

    If it has a # sign in front delete it.

    Restart apache.

    You didn't say if you're using OSX, linux, windows or Homestead (which is linux). the about should work for Linux and OSX. I have no idea what you need to do for windows.

    I don't use MAMP, WAMP or Homestead. I just use what is included with OSX and homebrew to add stuff.

  • where is httpd.conf file is localted in the folder

  • Global Moderator

    Marked as solved.
    Due to no response from OP on potential/actual solution proposal for over 1 month.

    If OP or someone else thinks this is not still solved, please respond with problem/concern.

Log in to reply

Looks like your connection to AsgardCms was lost, please wait while we try to reconnect.