4

I've a problem with Wamp Server and URL Rewriting. I've import my project from production server with his .htaccess. The URL Rewriting work fine on production, but not in localhost.

In my Wamp configuration, rewrite_module is activate. In the httpd.conf :

<Directory "c:/wamp/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.4/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:
#   AllowOverride FileInfo AuthConfig Limit
#
AllowOverride all

#
# Controls who can get stuff from this server.
#

#   onlineoffline tag - don't remove
#    Require local
 Allow from all
</Directory>

But, on my website, the link http://localhost/conditions return an 404 error. My .htaccess :

Options +FollowSymlinks
RewriteEngine on

# Conditions
RewriteRule ^conditions  pages/conditions.php [L]

All files are in the wamp's root (c:/wamp/www/).

Help :(

Nowis
  • 392
  • 3
  • 16

2 Answers2

2

In httpd.conf , have you the line where there is:

#LoadModule rewrite_module modules/mod_rewrite.so

If yes, remove the #.

Maybe you have to create a virtual host with an alias for your local application.

Follow this link here in this case.

Maybe you have already a virtual host and aliases who need to be disabled. Check in your files (hosts files, conf files etc...).

  • The line **LoadModule rewrite_module modules/mod_rewrite.so** was already uncomment. And i haven't virtual host. – Nowis Feb 02 '15 at 13:35
0

Don’t create htaccess file with windows explorer. You should create a new file in notepad and save as .htaccess

forever
  • 1
  • 1