This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Calculator Programming subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. General Coding and Design => Calculator Programming
Author Message
Rezek
Better Than You


Calc Guru


Joined: 24 Apr 2005
Posts: 1229

Posted: 18 Mar 2006 09:01:36 pm    Post subject:

I'm trying to develop a PHP / MySQL website. Everything uses index.php, which takes three parameters, C (category), S (section), and P (page). So If a user wanted to visit a php tutorial on reading from files, they'd go to:

www.domain.com/index.php?c=tutorials&s=php&p=reading-from-files

which would then look up the appropriate content in a database and display it for the user. However, that kind of url looks kind of ugly and isn't very search engine friendly. What I would like is a url like this:

www.domain.com/tutorials/php/reading-from-files

I know I can do this using mod_rewrite and believe me I have tried every tutorial I could find, but no matter what I tried, nothing, nothing worked Sad. I am extremely frustrated and was wondering if any of you could help? Also, wordpress seems to be able to do this without mod_rewrite. How?

One last thing, I still need to be able to access regular files normally, for example

www.domain.com/templates/softblue/images/banner.png

would still work normally. Sorry If I'm not explaining my problem very well, I'm trying to get it across... in case you can't tell, I'm pretty angry right now, at myself mostly. :|

[EDIT]

Oh, and it should be collapsable too, IE

www.domain.com/tutorials/php

would go to:

www.domain.com/index.php?c=tutorials/s=php

and so on.


Last edited by Guest on 18 Mar 2006 09:09:35 pm; edited 1 time in total
Back to top
kermmartian
Site Admin Kemetech


Calc Guru


Joined: 20 Mar 2004
Posts: 1220

Posted: 19 Mar 2006 01:15:12 am    Post subject:

Use Apache rewrites for your urls. Edit: erm, read that post a little better.
Make sure that you turn the rewrite engine on, that you have the htaccess in your web root, and that your host allows htaccess.


Last edited by Guest on 19 Mar 2006 01:16:23 am; edited 1 time in total
Back to top
Rezek
Better Than You


Calc Guru


Joined: 24 Apr 2005
Posts: 1229

Posted: 19 Mar 2006 09:10:53 am    Post subject:

Yeah, I've done all of those things. My mod rewrite's work now, but relative addresses don't :(

Ok, got it all figured out Smile The thing is for relative addresses, you have to put a "/" in front of them. Of course that defaults to the root directory, but it still works for me :)

Thanks anyways.


Last edited by Guest on 19 Mar 2006 10:40:18 am; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement