Jump to content

[SOLVED] Getting info from the addressbar, i.e. /news or /footy


masterbaker

Recommended Posts

I am designing a site for my brother and I want to be able to to redirect certain URLs to make it more user friendly.

i.e. if someone types http://www.mysite.com/footy or http://www.mysite.com/news then I want to redirect to http://www.mysite.com/sports/football/index.php and http://www.mysite.com/news/daily/currentheadlines.php.  I am stuck on how to do this.

Could I somehow redirect the ABC part of the following to a single php page and then deal with the forwarding there (http://www.mysite.com/ABC). I know how to redirect fine its just dealing with the /footy or /news
Thanks
master


You need to do some url rewriting (mod rewrite) in apache.

1st you need to make sure you can - some hosts will not let you.

this link will probably the one that will help you most initially.

[url=http://www.alistapart.com/articles/succeed/]http://www.alistapart.com/articles/succeed/[/url]

This guy has set up his entire site to be run from index.php something I do quite a bit but only recently have I started to use this method for search engine friendly urls - BUT a very good tool if you ask me (makes coding significantly easier too.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.