Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tominated

macrumors 68000
Original poster
Jul 7, 2006
1,723
0
Queensland, Australia
Ok, If you don't know from my previous 2 threads, I'm making a site for a client and want to use php includes. I got that done, but I wanted friendly urls, not ones that show up like "www.blah.com/index.php?blah=blah" (it would show up like "www.blah.com/blah" with friendly urls). I found this tutorial to do just that, but I have come across a problem, yet agin. The htaccess file works fine and dandy, but it's the fix for when a user puts a trailing slash after the url. I tried the following and it worked, but there were no css styles applied when the slash was put in:
PHP:
$page = ereg_replace("[^a-z]", "", $page);

Any ideas? BTW: my htaccess is exactly how it says in the tut
 
I found that tutorial to be written very poorly, citing examples that do one thing, then addressing obvious situations that requires change in the code, i.e. users adding slashes on the end of URL's. That should have been included in the first example, for crying out loud.

I noticed a section in the tutorial called "Small Issues" if you scroll almost all the way down, addressing "First off, if you go to http://example.com/about the rule works, but if you go to http://example.com/about/ then nothing matches - our p variable has changed with that one character!" which seems to be your situation.

They have a fix outlined there so I am guessing you need to do that.

If not, nevermind!!!!

-jim
 
I found that tutorial to be written very poorly, citing examples that do one thing, then addressing obvious situations that requires change in the code, i.e. users adding slashes on the end of URL's. That should have been included in the first example, for crying out loud.

I noticed a section in the tutorial called "Small Issues" if you scroll almost all the way down, addressing "First off, if you go to http://example.com/about the rule works, but if you go to http://example.com/about/ then nothing matches - our p variable has changed with that one character!" which seems to be your situation.

They have a fix outlined there so I am guessing you need to do that.

If not, nevermind!!!!

-jim

thing is, I'm using a different method to how they reference the files, but i'll try it their way and see how it goes. thanks anyway.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.