0

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?

2
Contributors
2
Replies
12
Views
3 Years
Discussion Span
Last Post by devianleong
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.