#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: |
Description
Hi,
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
# 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
Order Allow,Deny
Allow from All
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>
Change History (11)
comment:1 by , 9 years ago
Milestone: | → 3.1.4 release |
---|---|
Version: | → 3.1.3 |
comment:2 by , 9 years ago
Milestone: | 3.1.4 release → 4.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 , 8 years ago
Milestone: | 4.0 release → 4.1 release |
---|
comment:5 by , 7 years ago
Does the same issue occur with MS4W 3.2.6 release? https://ms4w.com/download.html
comment:6 by , 7 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
</Directory>
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
</IfModule>
</Directory>
comment:7 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Thanks for those notes, very helpful. I've added a section to the README with an example for mod_rewrite and mod_alias https://ms4w.com/README_INSTALL.html#apache-mod-rewrite-mod-alias-usage
Thanks for contributing this.