Member
Member
yanzen   26-12-2012, 15:03
#1

I know it is not strictly a zenphoto-issue, but I htought maybe someone here has had solved it already.

I am trying to achieve a 301-redirect of a page to a news category through htacess. The page is called "foo", the news-category is called "bar", so /pages/foo should redirect to /news/category/bar

So far I use

Redirect 301 /pages/foo http://www.mysite.de/news/category/bar

The problem is, that it somehow adds the non-beautified url-paramaeters to the end, so when I click on the menu item "foo" I get redirected to

mysite.de/news/category/bar?p=pages&title=foo

Does anyone know how I can prevent the rule from adding "?p=..."?

Thanks a lot and Happy Christmas

Administrator
Administrator
acrylian   26-12-2012, 18:26
#2

Where did you add that redirection? /pages/ is actually a rewritten url, the actual one is p=pages&title=.

Try this : RewriteRule ^pages/foo news/category/foo [L,R=301]
(Of course with the proper names instead foo). This is what we still have to redirect some older links when our site used Wordpress.

Member
Member
yanzen   26-12-2012, 18:51
#3

Thanks a bunch acrylian! I tried various locations, what works now is

RewriteRule ^pages/foo news/category/bar [L,R=301]

right after the opening

RewriteEngine On
RewriteBase /

I also tried with non-rewritten urls but that did not work.

I love Zenphoto!

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.