Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #17138
| From | "J.O. Aho" <user@example.net> |
|---|---|
| Newsgroups | comp.lang.php |
| Subject | Re: URL redirection |
| Date | 2016-10-14 08:00 +0200 |
| Message-ID | <e6bakgFo78hU1@mid.individual.net> (permalink) |
| References | <51696d6a-7960-4863-a5d7-6fd58eabacf4@googlegroups.com> |
On 10/13/2016 08:57 PM, bit-naughty@hotmail.com wrote: > I have a site, www.site.com which has users, and I would like site.com/user to go say, a "profile" page for each user. > However, say each user can post posts, I'd like site.com/review/2 to go to a page containing a post, ie. the URL has > to redirect to DIFFERENT URLs (.php programs), depending on whether "/review/<something>" has been appended to "site.com" > - how do I do this? And what's going on, behind the scenes actually? (I know very little about doing URL rewriting on Apache).... Apache is OT here, a search engine would been able to give you some help to find a starting point, like: https://www.sitepoint.com/apache-mod_rewrite-examples/ The simplest is to make all requests of the format not accessing any real pages to be redirected to one page which looks at the request url and then serves what you need, this is how popular CMS works. -- //Aho
Back to comp.lang.php | Previous | Next — Previous in thread | Find similar | Unroll thread
URL redirection bit-naughty@hotmail.com - 2016-10-13 11:57 -0700
Re: URL redirection Jerry Stuckle <jstucklex@attglobal.net> - 2016-10-13 16:43 -0400
Re: URL redirection bit-naughty@hotmail.com - 2016-10-19 06:45 -0700
Re: URL redirection Jerry Stuckle <jstucklex@attglobal.net> - 2016-10-19 10:19 -0400
Re: URL redirection "J.O. Aho" <user@example.net> - 2016-10-14 08:00 +0200
csiph-web