I am using following mod_rewrite rule:
**RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI}.php -f
RewriteRule ^(.*)$ $1.php [L]**
to get clean url such as
www.myweb.com/login
from
www.myweb.com/login.php
I am using another rewrite rule
**RewriteRule ^itemdetail/([0-9]+)/?$ itemdetail.php?itemid=$1 [NC,L]**
to get
www.myweb.com/itemdetail/100008
from
www.myweb.com/itemdetail?itemid=100008.
This works fine but there is one problem. This rewrite rule add a subdomain on every link. for example. if the link to css file is text.css now the link to this css file is itemdetail/text.css. The link to home page is now www.myweb.com/itemdetail/home instead of www.myweb.com/home. What am I doing wrong here. Please help.