Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

backslash after .php/ file extension knocks out css??

Status
Not open for further replies.

pushyr

Programmer
Jul 2, 2007
159
GB
i'm trying to make my urls search engine friendly by removing the query strings and using apaches look back $PATH_INFO function...

the only thing is that when i put a backslash in front of .php it knocks out my CSS... for example

this is my css include...
Code:
<link rel="stylesheet" href="_tools/modules/_css/admin.css" type="text/css" />

this is my regular url query string...


and this is my SEO friendly url which knocks out the css...

i've isolated it down to the 'backslash' directly in front of the .php/ extension. when i include it, it just knocks out the css

any takers on how i can correct the problem?
 
Try using an absolute path when you are calling your CSS file.
i.e. -
Code:
<link rel="stylesheet" href="[URL unfurl="true"]http://mysite.com/_tools/modules/_css/admin.css"[/URL] type="text/css" />

jason
 
thanks jman78! how could i be so stupid to neglect that simple fix!!!!
 
FYI, a backslash is this: \. What you called a "backslash" is called either a "forward slash" or just "slash".

Lee
 
sorry i meant forward slash

i can see that you are speculating over my placing the parameters after the php extension. please share your thoughts if you think this is a bad idea. do you think search engines stop reading after the php extension? i thought they stop reading once they start seeing the query string beginning with the '?' question mark.

i would rather use apache's RewriteRule to produce a cleaner url for example... ...but i've been having a little trouble with it

btw, sorry if this is the wrong forum group tp continue this discussion
 
Search engines don't particlarly care one way or the other these days, though it's a discussion more suited for forum828 .

Using mod_rewrite to hide the news.php bit is quite a good idea - it hides the implementation specifics from end-users and means that you could potentially change the way your site works in future without changing any URLs.

I wouldn't lose too much sleep over it though.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top