Jump to content

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......

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.