enabling mod_rewrite
Posted by: Paul-Carpenter (---.dynamic.dsl.as9105.com)
Date: May 30, 2006 08:06PM

In http.conf I have removed the hashes from the "LoadModule rewrite_module modules/mod_rewrite.so" and "AddModule mod_rewrite.c", and restarted the server. Yet WAMP still behaves as if mod_rewrite weren't enabled.



wall.brickcount.value++

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: CyberSpatium (67.170.181.---)
Date: May 30, 2006 10:54PM

remove
AddModule mod_rewrite.c

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: Paul-Carpenter (---.dynamic.dsl.as9105.com)
Date: May 31, 2006 01:55AM

Thankyou. I don't suppose you could explain why?

Also, apologies for the poor phrasing in my original post.



wall.brickcount.value++

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: CyberSpatium (67.170.181.---)
Date: May 31, 2006 02:10AM

to enable modrewrite you just need to enable LoadModule rewrite_module modules/mod_rewrite.so. that is it, nothing else. apache may have had problems when you used the addmodule to add mod_rewrite.c when mod_rewrite.so was also enabled

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: CyberSpatium (67.170.181.---)
Date: May 31, 2006 08:54AM

I just remembered why AddModule did not work for you. the AddModule was only supported by Apache 1.x. Apache dropped AddModule when they released apache 2.0. The latest version of WAMP uses Apache 2.0.55.



Post Edited (05-31-06 11:31)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: Paul-Carpenter (---.dynamic.dsl.as9105.com)
Date: May 31, 2006 02:04PM

Thanks smiling smiley



wall.brickcount.value++

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: Paul-Carpenter (---.dynamic.dsl.as9105.com)
Date: May 31, 2006 06:02PM

Sorry to be a bother but I've now only got the loadmodule line in and WAMP is still behaving as if mod_rewrite weren't enabled.



wall.brickcount.value++

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: CyberSpatium (67.170.181.---)
Date: May 31, 2006 06:05PM

are you getting any errors in your apache error log? how do you know modrewrite is not working.

More info on modrewrite
[httpd.apache.org]



Post Edited (05-31-06 18:06)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: Paul-Carpenter (---.dynamic.dsl.as9105.com)
Date: May 31, 2006 06:15PM

A line, appearing a lot in my error log:

[Wed May 24 17:50:58 2006] [alert] [client 127.0.0.1] f:/wampserver/www/.../.htaccess: Invalid command 'RewriteEngine', perhaps mis-spelled or defined by a module not included in the server configuration

I know it's not working becuase I was getting internal server errors when I tried it, and when I put aribitary things in .htaccess documents between <ifmodule mod_rewrite> tags, they didn't happen.



wall.brickcount.value++

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: CyberSpatium (67.170.181.---)
Date: May 31, 2006 06:19PM

can you post the contents of your htacess file here so I can see for myself what you are tyring to do, and if I see any errors?

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: Paul-Carpenter (---.dynamic.dsl.as9105.com)
Date: May 31, 2006 06:45PM

Sure. Thanks for the help.

This is my entire .htaccess file atm.

RewriteEngine on

Rewriterule ^PaulCarpenter/$ PaulCarpenter.php




wall.brickcount.value++

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: CyberSpatium (67.170.181.---)
Date: May 31, 2006 08:24PM

for what you are trying to do, you should use an alias, not mod_rewrite.

create a new text file called PaulCarpenter.conf. Save this file in this directory:
C:\wamp\Apache2\conf\alias

Enter this text in the PaulCarpenter.conf file:
Redirect /PaulCarpenter [www.your_website.com]

now open you httpd.conf file, and find (it is at the very end of the file):
Include "c:/wamp/apache2/conf/alias/sqlitemanager.conf"

Add below that:
Include "c:/wamp/apache2/conf/alias/PaulCarpenter.conf"

Now save the file and restart apache for the new settings to take effect. now, if you access:
http://www.your_website.com/PaulCarpenter

it will now take you to:
http://www.your_website.com/PaulCarpenter.php

Please be aware that windows is not case specific, so if you surf to:
http://www.your_website.com/paulcarpenter

it will work because windows does not worry about case. however, if you try to access the same url and your site was hosted on a linux server, it would not work because linux is case specific. for example, linux would consider PaulCarpenter.php and paulcarpenter.php to be two totally different files, because the case matters, where windows would consider both files the same since it is not case specific.



Post Edited (05-31-06 20:33)

CyberSpatium
----------------------
WAMP Forum Admin

Web Development for Newbie's Blog - Check out my new blog. It is for web developers, and especially tailored for the web development newbie. If you are not fluent in “geek speak”, then this incredible resource is just you. And even if you are a web development pro, this is a great resource to check out some of the latest web development tips, news, tutorials, codes and more.

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: Paul-Carpenter (---.dynamic.dsl.as9105.com)
Date: May 31, 2006 09:05PM

Thankyou muchly, but the above was just an experiment to get mod_rewrite working.
What I ultimately wanted to do was to get /PaulCarpenter/foo/bar/ to give /PaulCarpenter.php?this=foo&that=bar.



Post Edited (05-31-06 21:09)

wall.brickcount.value++

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: theMaab (---.ip.grandenetworks.net)
Date: June 25, 2006 08:10PM

Yes, I'm having the same problem that Paul is having.

I have created an alias using the wamp tasktray icon.

I then created an .htaccess for that alias.
My .htaccess is:
Rewriterule ^browse/(.*)$ browse.php?tag=$1

Now it seems to be working half-way. example:
when I browse too [localhost]
I do end up on the browse.php page as I set in my .htaccess, but
I do not get 'equipment' as a variable, I do not get the $_GET['tag'] on the browse page.

Anyone know what I have wrong?

I am thinking it is somehting in my alias.conf.
Currently I have:
Alias /ogd/ "c:/My Sites/OGD/www/"

<Directory "c:/My Sites/OGD/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: roms (---.fbx.proxad.net)
Date: June 25, 2006 09:25PM

hi, juste change the name of your php script to something else then browse.php (same name as your directory) and you'll see taht everything works fine.



Romain

Options: ReplyQuote
Re: enabling mod_rewrite
Posted by: figo2476 (---.tpgi.com.au)
Date: February 21, 2007 02:40AM

hi:

You may see my similar post about mod rewrite.

I uncomment the mod rewrite, but it can't restart wamp apache. Any idea?

Options: ReplyQuote


Sorry, only registered users may post in this forum.