eZ Community » Forums » Setup & design » Redirect an ez sub directory to an...
expandshrink

Redirect an ez sub directory to an external url

Redirect an ez sub directory to an external url

Friday 29 October 2010 1:30:40 pm - 6 replies

Hi,

I've tried to use the wildcards to redirect ubmaviationnews.com/mrodata to a url external to the site but it doesn't work.

htaccess doesn't work either so does anyone have any ideas on how I can do this?

Thanks in advance happy.gif Emoticon

Friday 29 October 2010 2:37:07 pm

I suggest using mod_rewrite or redirect apache configuration.

http://www.google.com/search?q=redirect+mod_rewrite

Cheers,

Heath

Friday 29 October 2010 3:03:32 pm

The long and complex way is to develop an http redirect operator to put in your template (it should be put in the pagelayout and not in the node template for proper effect).

Thursday 04 November 2010 3:00:30 pm

The long and complex way is to develop an http redirect operator to put in your template (it should be put in the pagelayout and not in the node template for proper effect).

Such an operator already exists:

http://projects.ez.no/redirect_operators

I've been using it a lot and it really does the job. Works with both eZ 4 and 3.

And it doesn't have to be included in the pagelayout.tpl, you can put it in node template also, but then you have to specify cache_ttl=0 in that template.

P.S. It can be really useful for redirecting full view of a file to the actual download of the file.

Thursday 04 November 2010 3:04:01 pm

P.S. Some advantages of the redirect operators:

  • you don't have to hard code the url which redirects - it will work even if you change the name of the object that redirects
  • you can control the redirect using eZ template logic
  • you can have as many redirected object as you wish, without having to add redirects in .htaccess

Modified on Thursday 04 November 2010 3:06:37 pm by Mavko Žmak - Žmale

Wednesday 17 November 2010 5:46:12 pm

Thanks, I'll give that a go! happy.gif Emoticon

Monday 27 October 2014 6:15:12 pm

The reply has been removed because of violation of forum rules.

expandshrink

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from