NYCPHP Meetup

NYPHP.org

[nycphp-talk] Mod_rewrite problem

Cliff Hirsch cliff at pinestream.com
Tue Feb 19 17:10:13 EST 2008


I didn't. I put it outside the dir directive. I tried moving it back to the
.htaccess file, and it works fine. This should be the same as putting it
inside the dir directive.

But I am still confused about why it is different when it's in the main
conf. I guess I just need to look at the logs to see what's happening.


On 2/19/08 4:45 PM, "John Campbell" <jcampbell1 at gmail.com> wrote:

> In the .conf file are you putting the rules inside a <Directory>
> directive?  As far as I know, <Direcory /path/to/folder/> works the
> same as .htaccess, and you should try copying it exactly.
> 
> On Feb 19, 2008 4:04 PM, Cliff Hirsch <cliff at pinestream.com> wrote:
>> 
>>  I use the following to help work with SEO-friendly URLs:
>> 
>>  RewriteBase /
>>  RewriteCond %{REQUEST_FILENAME} !-f
>>  RewriteCond %{REQUEST_FILENAME} !-d
>>  RewriteRule ^(.*)$ index.php [L,QSA]
>> 
>>  This works fine on my development machine in the main .htaccess file.
>> 
>>  On the production machine, I do the same thing, except it's in the main
>> conf file and there is no RewriteBase, since that is per dir context.
>> 
>>  But on the prod. machine, the css and images do not appear. All files are
>> relative to root (/css/file, /images/file). Any ideas?





More information about the talk mailing list