views:

33

answers:

1
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ $1.php
RewriteRule ^([^/]+)/([^/]+)/$ /$1/$2.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
RewriteRule (.*)$ /$1/ [L,NC]

The problem I am facing is that ;

Lets say I have a URL: /test.php. When I visit /test it works fine. But when I visit /test/ it open the page but the CSS and JavaScript file doesn't works and all the images are not displayed.

Please help me.

A: 

That’s a relative URI resolving issue (see http://stackoverflow.com/questions/891775/modrewrite-url-info-required/891785#891785 for details).

You’re probably using relative URI paths to reference the external resources. Try to use absolute URI paths (/foo/bar instead of foo/bar or ./foo/bar) if possible.

Gumbo
thanks for your help