views:

12

answers:

2

I have Apache and I have this in the .htaccess file:

RewriteEngine on
RewriteRule ^myhome myhome.php

because I want to redirect /myhome/ to /myhome.php. It works, but it behaves unusually.
When I type in myurl.com/myhome, it redirects to myurl.com/myhome.php correctly, but when I try myurl.com/myhome/ with the slash at the end, it redirects to the page but it can't find any stylesheets or images (the paths for which are relative).

The code references "image.png" and "style.css" and without the slash at the end, it works and loads those files correctly, but with the slash, it doesn't. I think this is because it's thinking it's loading from the myhome/ directory now instead of the base directory. Could anyone tell me how to get it working right?

A: 

Nevermind, I did what I wanted to do with the advice on this page:
http://www.hotscripts.com/forums/php/21907-php-files-no-extension.html

ShizzleBro
A: 

appending / at last makes as if u are browsing default page of myhome directory i.e myhome/index.htm

generally i use html tag base url and add my site url there for my working on my site.

<base href="http://www.myurl.com" />
KoolKabin