Jump to content

big mod_rewrite problem


zander1983

Recommended Posts

Hi

 

I have found a pretty fundamental problem with mod_rewrite. I want to rewrite a url from

product_details.php?productid=product_name

 

to

 

product/product_name

 

the product_details.php is being linked to from a few different pages, so i dont want to change code in it.

 

Mod_rewrite is working and it does redirect to product_details.php?productid=product_name, except none of the styles or includes loads. this is because the stylesheet is located at style/style.css and includes at includes/menu.php.

 

even though the product_details.php page is being loaded for the url  product/product_name, the styles & includes are not as its looking for them in the non existent product folder.

 

how can i get around this problem? do i have to use absolutle url's? i dont want to as i'll have to change them when i go from localhost to the test server, to the server.

 

anybody any ideas?

Link to comment
Share on other sites

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.