Jump to content


mod_rewrite on localhost

  • Please log in to reply
1 reply to this topic

#1 goatboy

  • Members
  • PipPip
  • Member
  • 28 posts

Posted 21 September 2006 - 08:48 PM

I'm not having any problem with mod_rewrite on my server. It seems to be working fine. but on my local machine I'm

My settings in my httaccess file are the same.
O my local machine is windows with apache 2.0. my server is fedora core 2 not apache 2.0

the problem is, and i initally had this problem on the server.
the css and images are broken.
To fix this on the server I had to add a / to the begining of each image and css url

however on the local machine this is not working. and it's quite a problem for working on my script.

i'm working in a sub directory so my file path is


the only way it works on the local machine is if i add mysite/  to the begining of the image url.

and i do have rewritebase set.

any ideas?

#2 yonta

  • Members
  • PipPipPip
  • Advanced Member
  • 70 posts

Posted 29 September 2006 - 12:41 AM

I had the same problem and the only thing that worked was adding

<base href="<?php echo SITE_ROOT; ?>"/> where SITE_ROOT is "http://localhost/site/"

in the head section of the page.

Hope this helps
do it, do it right, do it right now

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users