Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #17138

Re: URL redirection

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "J.O. Aho" <user@example.net>
Newsgroups comp.lang.php
Subject Re: URL redirection
Date Fri, 14 Oct 2016 08:00:47 +0200
Lines 21
Message-ID <e6bakgFo78hU1@mid.individual.net> (permalink)
References <51696d6a-7960-4863-a5d7-6fd58eabacf4@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace individual.net gjosBoxbkNdFEVegtrwBrwxIGRQPafxLvf4YkFltHIt3gPUN3f
Cancel-Lock sha1:fZR4IQ9TufjS9yXqwah+/lztebU=
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
In-Reply-To <51696d6a-7960-4863-a5d7-6fd58eabacf4@googlegroups.com>
Xref csiph.com comp.lang.php:17138

Show key headers only | View raw


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 | NextPrevious in thread | Find similar | Unroll thread


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