Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

easyphp and .htaccess

I need help with EasyPHP and .htaccess .

The .htaccess file isn't working, I think its because I didn't setup something with EasyPHP.

My EasyPHP version is 5.3.8.1

Maybe anyone knows how to fix this problem ?

.htaccess file :

Options +FollowSymlinks

RewriteEngine on

RewriteRule ^get/([^/]+) /func/get.php?link=$1 [NC]

like image 876
robpal Avatar asked Jan 18 '23 06:01

robpal


2 Answers

Default installation of Apache in EasyPHP don't have activated the option to use .htaccess files to modify server configuration in folders.

You have to tell Apache what configuration can be changed with .htaccess files, and in which folder. To enable all config changes on main web server, you should edit http.conf (in Apache/conf folder), and look for:

<Directory "${path}/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.2/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Order allow,deny
    Allow from all

</Directory>

and change

    AllowOverride None

to

    AllowOverride All

To better fine tune it, read documentation about AllowOverride in: http://httpd.apache.org/docs/2.2/mod/core.html#allowoverride

Also, check that http.conf has mod_rewrite activated, look for:

#LoadModule rewrite_module modules/mod_rewrite.so

And remove the leading "#"

LoadModule rewrite_module modules/mod_rewrite.so
like image 91
vicenteherrera Avatar answered Jan 20 '23 21:01

vicenteherrera


When working on a local website I fixed this problem by adding the website path (with the .htaccess) as a virtual host. Easyphp has got a module for this: 'Virtual Hosts Manager'. This wil automatically take care of the httpd.conf.

like image 33
pkmelee337 Avatar answered Jan 20 '23 21:01

pkmelee337