Jump to content

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


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.)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.