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?

Recommended Answers

All 3 Replies

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"; />

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.