hybrid kill3r Posted July 19, 2009 Share Posted July 19, 2009 I just figured out how to use mod_rewrite. My htaccess code is the following: Options +FollowSymlinksRewriteEngine onRewriteRule profile/([a-z]+)/([0-9]+) profile.php?action=$1&uid=$2RewriteRule forum/([0-9]+) threadlist.php?forumid=$1 I don't get any errors, but it won't display the stylesheet, even though I know the path it gets is correct because of the source code. I call the stylesheet with a php file using dirname(__FILE__) and it displays correctly and there is in fact a stylesheet at that specific path when I type it into my browser.BTW, not sure if this is HTML, but didn't know where else to put it. Link to comment Share on other sites More sharing options...
boen_robot Posted July 19, 2009 Share Posted July 19, 2009 Try to create a link (an "a" element that is) leading to the same location (as written in your "link" element). Right click and select properties. Look at the "Address (URL)" field, and try to open THAT in your browser (you can select, copy and paste the value in there). It may turn out that the location you thought your path resolves to is different than the one the browser actually resolves it to. Link to comment Share on other sites More sharing options...
hybrid kill3r Posted July 20, 2009 Author Share Posted July 20, 2009 The link takes me to the same place, but it says the file isn't found. I am 100% positive that the URL is correct. Link to comment Share on other sites More sharing options...
boen_robot Posted July 20, 2009 Share Posted July 20, 2009 The link takes me to the same place, but it says the file isn't found. I am 100% positive that the URL is correct.Could you give a link to the forum/site, and the supposed stylesheet? Also, where is the .htaccess located exactly? There could be a lot of places where relative paths could turn into a nightmare. Link to comment Share on other sites More sharing options...
hybrid kill3r Posted July 20, 2009 Author Share Posted July 20, 2009 http://www.serverstrike.net/WarBoards/http://www.serverstrike.net/WarBoards/temp...fault/style.cssIt worked fine before I made the htaccess. Link to comment Share on other sites More sharing options...
boen_robot Posted July 20, 2009 Share Posted July 20, 2009 You should've followed everything I said...In http://www.serverstrike.net/WarBoards/forum/2 looking at the source code shows <link href='templates/default/style.css' rel=stylesheet /> If you create an achor to that, you'll have <a href='templates/default/style.css'>CSS</a> Right clicking on that should give you (and this is just a guess, based on what I'm able to do as a viewer): http://www.serverstrike.net/WarBoards/forum/2/templates/default/style.css Which I guess isn't where your CSS is located, right?If possible, try to give it an absolute path, as with your CSS at the main forum page: <link href='http://serverstrike.net/WarBoards/templates/default/style.css' rel=stylesheet /> or (for the sake of portability; for the sake of lesses bandwidth; ideally): <link href="/WarBoards/templates/default/style.css" rel="stylesheet" /> Link to comment Share on other sites More sharing options...
hybrid kill3r Posted July 30, 2009 Author Share Posted July 30, 2009 The images are not loading now either. You'd think that since it's rewriting the url to a php page in the main directory that it would work. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.