I’m stuck with a problem for a while, and i was thinking maybe i can do this directly with EE.
The problem is: I have a one layout page index.php, which loads content dynamic created with div’s. This means that i use a dynamic URL but with a static page and i wanna redirect the incoming links on a static page to the dynamic page.
Examples URL’s
Index page
http://www.mydomain.com
About us page:
http://www.mydomain.com/#index.php/site/about
Contact us page:
http://www.mydomain.com/#index.php/site/contact
etc… this works fine.
But when you search on google the pages are separately founded by google, which is also great but the problem is google links them to:
http://www.mydomain.com/index.php/site/about
So without a #, which i need to navigate in the site.
Now my first thought was that i can edit this with HTACCESS, but with no experience and knowledge this didn’t work for me.
So other people say a “mod rewrite” but also with no knowledge this is a bit to hard for me.
So thats why i now was looking for a EE solution like this one:
{if site_url != '#index.php'}
<meta http-equiv="refresh" content="0;url={site_url}#index.php/{segment_1}/{segment_2}/{segment_3}" />
{/if}This kindof do what i want, but i think i forgot something or do it the wrong way, because when i use this code in the header snippet, it will redirect from:
http://www.mydomain.com/index.php/site/about/ to http://www.mydomain.com/#index.php/site/about/
But then directly redirects to:
http://www.mydomain.com/#index.php///
and the page is gone.
So after a long story, does anybody see what mistake i make or does somebody has experience with this problem who can help me with this.
————————————————————————————————
Extra information:
site_url = http://www.mydomain.com
Thank you already for your time.