2009年7月20日星期一

Re: [fw-mvc] URL Redirection

The absolute easiest thing to do if there are a limited number of urls
is to use the .htaccess to redirect the user. This means everything is
in the .htaccess file and not creating multiple files in public/

Here is a decent guide:
http://www.lancelhoff.com/add-301-redirects-using-htaccess/

IF you need some other custom rules, it might be better to go with the
.htaccess rewrite capabilities. Without getting into the details here,
I'd say first have a look at this post:

http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html

and this post:

http://groups.drupal.org/node/11361

Hope this gets you on your way.

-ralph

Naimesh.Trivedi (Gmail) wrote:
> Hello All !
>
> I have created basic application using zend tool available in Zend
> Framework 1.8.4 so the directory structure is standard as created by it
> and index.html in /public folder.
>
> I want to convert my old site using this Zend framework. But I have done
> offline SEO of certain URLs of it including home page so they are as our
> back links like :
>
> Code: Select all <http://forums.zend.com/viewtopic.php?f=69&t=1619>
>
> |http://www.abc.com - home page|
> |http://www.abc.com/content1.php|
> |http://www.abc.com/content2.php|
> |http://www.abc.com/content2.php|
>
>
>
> All above pages are there listed on some sites so I have to have this
> URLs up, but in Zend there would be only one URL and all other are as
> controller/action format.
>
> so can anybody help me, how and where to create above mentioned blank
> files and redirect them to new URL Like :
>
> Code: Select all <http://forums.zend.com/viewtopic.php?f=69&t=1619>
>
> |http://www.abc.com - home page -> http://www.abc.com|
> |http://www.abc.com/content1.php -> http://www.abc.com/content1
> where conten1is controller|
> |http://www.abc.com/content2.php -> http://www.abc.com/content2
> where conten2is controller|
> |http://www.abc.com/content2.php -> http://www.abc.com/content3
> where conten3is controller|
>
>
> So that anybody clicking on old link from any website would be
> redirected to this new URLs as mentioned above.
>
> Can this be checked in PreDispatch and redirect accordingly ? If so, how
> to write and where should that file be kept and what would be its full
> name (with extension ?)
>
>
> Please help me on above.
>
> Thanks & Regards,
>
> AUM InfoTech Team
>

没有评论: