Problem with redirect pages containing index.php?

Hi Guys,

I tried to redirect pages from the old installation of a website

to the page:

inside the "Location" panel of a page.
That don't works - it always redirects to the front page:

I think all pages with an /index.php? will be redirected to the start page. I tried without internationalization and with 5.7.5RC1

Any Idea how to solve this - is it a bug (using


1 Attachment

View Replies:
Remo replied on at Permalink Reply
did you try that with .htaccess? Can you post your htaccess file?
I'd assume -f causes the problem because index.php is an actual file that exists on your new site..
tsilbermann replied on at Permalink Reply
I tried with and without pretty URLs enabled.
I didn't changed things in .htaccess file:

# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule . index.php [L]
        # -- concrete5 urls end --

I tried it with pretty URLs turned off and removed the .htaccess file - same result: redirects to start page.
Remo replied on at Permalink Reply
and where are the redirect rules? I can't see how you're redirecting the old to the new pages..
tsilbermann replied on at Permalink Reply 1 Attachment
I tried it from "Location" panel of a page. See attached image above.
The URL redirects (301) - but not to this page (in this case "contact") - it redirects to the start page.

Lets say the old installation had a page with the URL:

I can redirect it to the new page called:

within the page "Location" panel adding a URL called:

this redirects to my new page called "contact".

But not if "index.php?" is inside the old url
Remo replied on at Permalink Reply
sorry, missed that attachment!

That approach won't work, index.php is a page and ?page=contact is nothing but a parameter to a page and won't be considered as an URI.

You'll either have to use an add-on like URL director which doesn't exist for 5.7 or create a custom .htaccess file to redirect those addresses..
tsilbermann replied on at Permalink Reply
That means this page redirect function in concrete5 is not made for such redirects?
Even if ?page=contact is just an parameter - its an URL that will be redirected by the concrete5 redirection function - but wrong.

I think this often happens when relaunching a website (old site: index.php?=contact - new site: pretty URLs) and I thought this function is for such kind of redirects. I don't think this is a very special case.

Shouldn't it be part of this function?
Remo replied on at Permalink Reply
No, that will never work for parameters, that would cause a ton of other problems. You can redirect the path, but not the full URI.

We only ever use this function when we move pages in concrete5 around, never to handle redirects, that's not the intent of this function.
tsilbermann replied on at Permalink Reply
Ok - its just for using inside the concrete5 installation. It's too bad - would be a nice feature...
I need to find another solution.

Thanks a lot Remo :-)