Jump to content

CSS Problem in URL Rewriting


khalidmushtaq65

Recommended Posts

Hi,

I am facing a problem in url rewriting, that is my case.....

 

When I rewrite

 

http://www.something.com/users

 

to

 

http://www.something.com/users.php

 

It works fine.... It's that when I use one string after my server / domain name, it works fine.....

 

But when rewriting something

 

http://www.somethig.com/users/pakistan or http://www.something.com/users/pakistan/lahore

 

to

 

http://www.something/users.php?country=pakistan or http://www.something/users.php?country=pakistan&city=lahore

 

respectively, the css of the respective page doesn't apply on that page....

 

In short, one string is working, more than one disable the css of the page....

 

I hope you will help me...

 

Thanks.

 

Link to comment
https://forums.phpfreaks.com/topic/211199-css-problem-in-url-rewriting/
Share on other sites

Add a / in front of the styles sheets file name, eg

<link rel="stylesheet" type="text/css" href="/stylesheet.css" />

Now it will always load from the root of your url, eg http://www.somethig.com/stylesheet.css. Otherwise the browser is thinking you're within a directory and is loading the css file in http://www.somethig.com/users/ or http://www.somethig.com/users/pakistan/

CSS Problem is fixed now...

 

Now another problem has occured...

 

When I click on a link i.e.

http://localhost/ecommerce/smartadmin/dashboard/pages/6

 

and then hover a mouse on another link it will add 'pages/' to that link... something like that.

http://localhost/ecommerce/smartadmin/dashboard/pages/customer/list

 

Can you help me in fixing this?

 

Thanks......

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.