Mod rewrite mod_rewrite

Well it seems I cannot figure it out, but I think one of my main problems is that when I pull up my PHP info, mod_rewrite is not in there. I thought this is active on all dreamhost accounts.
I can put all the stuff I want in .htaccess but if its not there I am SOL right? but more importantly why is it not there?

I don’t think that mod_rewrite is part of PHP. It’s just an Apache module. It’s there. Is it not working for you? If not, what are you trying to do, and what have you tried so far?


everything I ever read on rewrite code in htaccess starts with…"check to see if that module is loaded by checking your “phpmyinfo” " and search for mod_rewrite, if you find it, great, then the next step is to turn it on. Well since I have read all dreamhost accounts have it loaded, since it didnt show up I would just start loading rules ( after turning it on in htaccess of course) and nothing works, I have tried multiple variations with no success, I have also tried using rewrite generators to write the code and cut and paste it with no luck.
thanks for the feedback!

None of the actual mod_rewrite module documentation makes mention that this is part of PHP. It’s an Apache module, so it’s surprising that it doesn’t work. What’s an example of what you’ve tried that’s not working?


That sounds like you are reading about running mod_php (PHP as an Apache module) rather than PHP-CGI (which is what runs here on DreamHost).

Assuming “phpmyinfo” is a script that outputs the results of the phpinfo() function, if mod_php is running that output will include an “Apache” section, and you could see the Apache modules that are installed displayed there.

This is not included in the output of phpinfo() when running PHP-CGI.

moe_rewrite is an apache module, not a php module. phpinfo() will not indicate its presence, or absence, using phpinfo() when running PHP-CGI on DreamHost, and mod_rewrite is installed on DreamHost Apaches.

If it is not working for you, sharing your .htaccess file here might enable someone to see why it is failing.

–DreamHost Tech Support

One example of an attempt is this one

Options +FollowSymLinks
RewriteEngine on
RewriteRule http://www(.)-(.).htm$ /?state=$1&city=$2

trying to rewrite urls like…

to this