Hi, I am developing a website and I want to use htaccess to change the url from
www.abc.com/user.php?c=devian to www.abc.com/user/devian

I use the code below to convert url and it's work but why all CSS and js not reading?

RewriteRule ^user/(.+)$ user.php?c=$1 [NC,L]

If I access www.abc.com/user.php?c=devian then I can access it with no doubt but after convert the url everything become pure html:

af4cbc79cf426e94bd85ce84e4a9301f

Not only that, If query cannot be found (user.php?c=query) it will redirect back to www.abc.com/user/index.php . Any solution?

It depends on how your CSS is setup, basically the path to the CSS is:

www.abc.com/user.php => CSS/default.css

www.abc.com/user/devian => ../CSS/default.css

If you are using relative paths, this is the first thing that goes wrong.

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.