Opened 6 years ago

Closed 4 years ago

Last modified 3 months ago

#54 closed defect (fixed)

Apache mod rewrite httpd.conf issue

Reported by: markwss Owned by: Jeff McKenna
Priority: minor Milestone: 5.0.0 release
Component: MS4W - Apache Version: 3.1.3
Keywords: apache, mod_rewrite Cc:
Blocked By: Blocking:



Looks like Apache httpd.conf needs to be setup differently for mod rewrite to work.

This the setting for DocumentRoot that made it work for me:

DocumentRoot "D:/ms4w/Apache/htdocs"
<Directory "D:/ms4w/Apache/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
# 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

Order Allow,Deny

Allow from All

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


Change History (11)

comment:1 by Jeff McKenna, 6 years ago

Milestone: 3.1.4 release
Version: 3.1.3

Thanks for contributing this.

comment:2 by Jeff McKenna, 6 years ago

Milestone: 3.1.4 release4.0 release

Moving to MS4W 4.0 release. (I wasn't able to test these proposed changes in time for the 3.1.4 release)

comment:3 by Jeff McKenna, 6 years ago

Milestone: 4.0 release4.1 release

comment:4 by Jeff McKenna, 5 years ago

Does the same issue occur with MS4W 3.2.0 ?

comment:5 by Jeff McKenna, 4 years ago

Does the same issue occur with MS4W 3.2.6 release?

comment:6 by TC Haddad, 4 years ago

I haven't yet tested 3.2.6, but I can report that I've been using mod_rewrite successfully for a while (over a year?).

I use the default MS4W settings for DocumentRoot, and then only add the changes needed for mod_rewrite to the directory that needs the rewrites.

In other words, I think these settings could be added to the documentation for people who want to turn on mod_rewrite, but for default MS4W users, I think the default settings are appropriate.

my settings are:

DocumentRoot "/ms4w/Apache/htdocs"

<Directory "/ms4w/Apache/htdocs">

Options Indexes FollowSymLinks
AllowOverride None
Require all granted


followed further down by:

# Configure MS4W locations and directories

# (after other MS4W Directory settings)

<Directory "/ms4w/apps/someappthatneedsrewrites">

Options FollowSymLinks
AllowOverride All
<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase / #whatever your app needs here
RewriteRule #some rule depending on what you need to implement



Last edited 4 years ago by TC Haddad (previous) (diff)

comment:7 by Jeff McKenna, 4 years ago

Resolution: fixed
Status: newclosed

Thanks for those notes, very helpful. I've added a section to the README with an example for mod_rewrite and mod_alias

comment:8 by Jeff McKenna, 20 months ago

Milestone: 4.1 release4.2 release

Milestone renamed

comment:9 by Jeff McKenna, 20 months ago

Milestone: 4.2 release4.1 release

Milestone renamed

comment:10 by Jeff McKenna, 16 months ago

Milestone: 4.1 release4.1.0 release

Milestone renamed

comment:11 by Jeff McKenna, 3 months ago

Milestone: 4.1.0 release5.0.0 release

Milestone renamed

Note: See TracTickets for help on using tickets.