Welcome Guest, Not a member yet? Register   Sign In
.htaccess not working
#1

[eluser]Unknown[/eluser]
Hi everyone,

I am trying to get my .htaccess file working so that I don't need to include 'index.php' in all of my links. The problem is I don't think my htaccess file is even being read. I tried putting the word "test" in there but there was no change to the function of my localhost site.

Here is the code for my httpd.conf file:
Code:
<Directory />
     Options FollowSymLinks
     AllowOverride All
     Require all granted
#    AllowOverride All
#    Require all denied
</Directory>


# XAMPP: We disable operating system specific optimizations for a listening
# socket by the http protocol here. IE 64 bit make problems without this.  
AcceptFilter http none

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/xampp/htdocs">
    #
    # 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 Includes ExecCGI

    #
    # 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 All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted

</Directory>

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
                   default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
                   home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
Require all denied
</Files>

Any Ideas on whats going on?
Thanks
#2

[eluser]Unknown[/eluser]
Nvm, I fixed it! I had my .htaccess file in the wrong location. I needed to put it in the C:\xampp\CodeIgniter directory. I had my file within the application folder!




Theme © iAndrew 2016 - Forum software by © MyBB