mod_rewrite

Problems with the Windows version of XAMPP, questions, comments, and anything related.

mod_rewrite

Postby carlwenrich » 02. October 2007 23:14

I uncommented the line (in httpd.conf) to load mod_rewrite.so but the htaccess file containing the rewrite engine and rules is still being ignored. Is there something else I have to change?
carlwenrich
 
Posts: 5
Joined: 02. October 2007 22:03

Postby Wiedmann » 02. October 2007 23:47

Maybe "AllowOverride".
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany

thanks anyway

Postby carlwenrich » 03. October 2007 06:54

I tried setting it from None to All, but it didn't change anything. I'm assuming that if I stop and then start apache, that's all I need to do to pick up the changed httpd.conf file.
carlwenrich
 
Posts: 5
Joined: 02. October 2007 22:03

Postby Izzy » 03. October 2007 07:08

...I'm assuming that if I stop and then start apache, that's all I need to do to pick up the changed httpd.conf file

Every time you edit a configuration file restart Apache to have the edits recognized.

In your .htaccess file don't forget to turn on the rewrite engine.
RewriteEngine on

Item 4 D explains.
http://community.apachefriends.org/f/viewtopic.php?t=20957

=================================================
Take a look at the new DeskTopXampp launch control for XAMPP and XAMPPlite (DTX.exe)
http://nat32.com/dtx/
posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967
Also available here: http://zedfiles.com/DTX/
I highly recommend DTX.
=================================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Thanks Izzy... but...

Postby carlwenrich » 03. October 2007 11:54

The "RewriteEngine on" is in a local htaccess (it's not .htaccess) file (remember, I'm under windows) but it still doesn't work. The Rewrite rules are also in this local file. It works on the demo site do the guy who wrote the site scripts tells me it's definitely my server that's the problem. My problem is that I don't know what I have to do to my server to enable this feature.
carlwenrich
 
Posts: 5
Joined: 02. October 2007 22:03

Postby Izzy » 03. October 2007 12:40

htaccess won't be recognized by Apache.

It needs to be .htaccess even under Windows.

If Windows baulks at the file when trying to open it, try this:
Drag the file into your text editor, edit, then save it.

Also try associating the .htaccess file with your text editor.

When you get the window "Windows cannot open this file:"
Click on "Select open from a list" and select your text editor (notepad perhaps).
Tick the box "Always use this program to open this kind of file".
Click OK.

Now when you click on .htaccess file it will open in your notepad for editing.

This .htaccess file is defined in your httpd.conf file not htaccess at about line 252 in a default httpd.conf file.
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
</FilesMatch>

AccessFileName .htaccess
There is nothing wrong with the server.


=================================================
Take a look at the new DeskTopXampp launch control for XAMPP and XAMPPlite (DTX.exe)
http://nat32.com/dtx/
posted by ridgewood:
http://community.apachefriends.org/f/viewtopi ... 967#103967
Also available here: http://zedfiles.com/DTX/
I highly recommend DTX.
=================================================
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Thanks again. Here's what I needed to do:

Postby carlwenrich » 03. October 2007 18:27

1 - Rename htaccess to .htaccess
2 - Uncomment the mod_rewrite loading in httpd.conf

Thanks to everyone who helped with this.

Carl
carlwenrich
 
Posts: 5
Joined: 02. October 2007 22:03


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 50 guests