i have following .htaccess

   RewriteEngine On

DirectoryIndex index.php

RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3 [L]

RewriteRule ^([a-zA-Z0-9_-]{3,20})/([^/]+)?$ index\.php?page=$1&s=$2 [L]

RewriteRule ^([a-zA-Z0-9_-]{3,20})/?$ index\.php?page=$1 [L]

RewriteRule ^([a-zA-Z0-9_-]{3,20})?$ index\.php?page=$1 [L]

ErrorDocument 404 /404

it displays mu url as localhost/mysite/home for first perimeter and its going fine but when my url is localhost/mysite/home/user, whole look of page is disturbed i.e. no css and image is included here can any one please help me with this?

Try adding your CSS/images with absolute links, for example: /styles/default.css

i included my css like <link rel="stylesheet" href="css/style.css" /> but while viewing source, i am having the following source <link rel="stylesheet" href="localhost/mysite/css/style.css"; />

Make it an absolute link, as in my example.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.