Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
mod-rewrite messes with my layout
Old 05-24-2009, 11:39 AM mod-rewrite messes with my layout
Skilled Talker

Posts: 83
Trades: 0
Hello,

I am doing my first experiments with mod-rewrite.

This is my.htaccess
Code:
RewriteEngine on
RewriteRule ^page/([^/\.]+)/?$ index.php?cid=$1 [L]
When i enter the url index.php?cid=31 then everything is OK

But when i enter the url page/31 then the entire website layout is corrupted: no images show up, appearently no CSS file was loades ... its terrible. What am i doing wrong?

thanks!

Matt

Last edited by killerwhale65; 05-24-2009 at 11:41 AM..
killerwhale65 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-24-2009, 03:43 PM Re: mod-rewrite messes with my layout
rogem002's Avatar
PHP Chap

Posts: 843
Name: Mike
Location: United Kingdom
Trades: 0
Your not linking to your images / CSS correctly. Make sure you put the full URL to your images and CSS. However, without your code I cannot help you any more.
__________________
My Blog/Site:
Please login or register to view this content. Registration is FREE
rogem002 is offline
Reply With Quote
View Public Profile Visit rogem002's homepage!
 
Old 05-24-2009, 04:41 PM Re: mod-rewrite messes with my layout
maxxximus's Avatar
Extreme Talker

Posts: 219
Name: Rob
Location: UK
Trades: 0
Your using document relative linking for your images / css etc. You need to use root relative linking - start with a forward slash for the root and work from there.

HTML Code:
<link href="/your_css_folder/your_css_file.css" rel="stylesheet" type="text/css" />
maxxximus is offline
Reply With Quote
View Public Profile
 
Old 05-25-2009, 07:26 AM Re: mod-rewrite messes with my layout
Skilled Talker

Posts: 83
Trades: 0
ok thanks!
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to mod-rewrite messes with my layout
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.19019 seconds with 12 queries