Duplicate URLs in Zend - zend-framework

I am developing a ZF website: howtowritecitations (dot) com
and it has a TOS page:
howtowritecitations (dot) com/termsofservice
But what are these duplicate pages?
http://www.howtowritecitations.com/termsofservice/index
http://www.howtowritecitations.com/index.php/termsofservice
http://www.howtowritecitations.com/index.php/index/termsofservice
Where did they come from? Will this be a problem? I hope not. For example, when Google crawls the page, it will only find and index howtowritecitations (dot) com/termsofservice, right?
If it is a potential problem, show me in the right direction so I can try and solve it.
Someone suggested to start looking at getRequestUri() in routeShutdown() (or something similar)
to use preg_replace to remove index.php, in order to 301-redirect to the proper URL, but I lost here.
Thanks in advance for advice or comments

This is caused by the routes you have setup. By default, Zend Framework applications usually route like:
www.yoursite.com/:controller/:action/:param
Right now, your termsofservice controller located at www.yoursite.com/termsofservice when called will show the :index action by default when no action is specified without changing the URL. It is also perfectly valid to access it using www.yoursite.com/termsofservice/index.
In order to fix these, you need to setup custom routes where everything that matches www.yoursite.com/:controller/* will route to www.yoursite.com/:controller. That way Google will never get a chance to see an alternate URL to index.

Related

Page pagination issue in Drupal website

I have an issue in drupal website ( http://www.perfectchoice.ae/properties-browse/ ) when I go to click on 2nd page number then no property comes there.
I don't have knowledge about Drupal. Looking for someone to help me please.
Page parameter is working:
http://www.perfectchoice.ae/properties-browse/?page=3
So some other is causing the problem. When you move to some page and it doesn't show anything try removing URL parameters one by one until you figure out which one is causing the problem. But in any case you will need some Drupal knowledge to solve this.
With the very less information provided in the description, it is difficult to figure out the issue/fix.
One probable reason would be your views is not getting displayed on the URLs other than 'properties-browse'. You need to make the visibility settings of the main block to 'properties-browse*'
Good Luck!!!

Add hash to lift menu entry url

I need something like this
def sitemap(): SiteMap = SiteMap( Menu.i("Home") / "index#myhash/subhash" )
The point is I need add hash to the menu url. So, the resulting url would be like this
Home .
Is there any way to do it? I need just a temporary solution, so, any idea/hack would help.
thank you
The answer I recieved in lift community mail list is that I can't add hash when using sitemap because (as I see) sitemap is intented to be a server side thing that will also catch/match different url locations and help to router them. And since hashes are never sent to server, SiteMap does not work with hashes at all.
To solve my problem I just built menu links myself (I just added html markup to the page). It was acceptable for my case. In more complicated situation one can use snippet (self-written) to generate the menu in preferable way.

modx replacing article link with a link of categories

I've got a staging and live site I'm working on (not my code base). I've accidentally replaced the live server with some staging code (no backup (slap me)) and I'm getting weird urls for articles on the sites 'blog' page.
Basically everything's being called into the page correctly but the page header link is being screwed.
Rather than being
http://www.example.com/a-nice-url
it's giving me
http://www.example.com/news,recent,pr,etc
which appears to be the list of categories of the article.
Where/How can I easily fix this?
I'm only calling [[*content]] and can't find where that is.
Linking to an article I know is there with the correct url works still.
any ideas would be greatly appreciated.
I assume your blog page has some sort of listing somewhere, maybe a getResources call? If you can't find it in your blog list template (as you're saying you only see a *content), it means the list is probably "hardcoded" in the blog list resource content field.
You'll want to find the chunks being used to output each blog entry on the lists and check which page parameter is used to construct the link. It should probably be *alias, and if it is and your aliases are correct you have some deeper trouble going on.

TYPO3 does not resolve url correctly

I'm pretty new to TYPO3 and currently stuck with the following issue:
I copied the templates from another webpage that is currently in business.
When I'm on the startpage of my homepage (www.domain.com) and click on one of the links it contains I always get an error 404. The link that is generated looks like this.
http://www.domain.com/testpage.440.0.html
So I guess something like RealUrl was in use on the webpage that I copied from? Do I understand this right? I don't see that RealUrl is installed though.
However If i manually change this link to
http://www.domain.com/?id=440.0.html
the site is being created.
How does Typo3 know to generate a page when it receives the first version of these two links?
Does not really look like a standard out-of-the-box REAL URL url. That would rather have been /testpage-404.html . So maybe the problem is somewhere else, could be:
simulate static (check if that extension is running). A common mistake is to run real url an simulate static at the same time. If you do not need speaking urls for the moment, just uninstall simulate static.
make sure you add a domain to your shortcut. Use the the list modul and select the root shortcut. Then click create new record, select domain. and enter your domain there. Flush all the caches and try again.
If you'd post your TS Code (of the root shortcut page) here, I could probably tell what's going wrong.
real url configuration typically use .htaccess files.. maybe that file still contains information from the original destination.
check if the root ts contains some baseUrl statement
Which version of TYPO3 are you using?
HTH, but feel free to post more infos.
If your typoscript template is expecting to find realurl and its not installed as a plugin, that could be the cause. You'll need to either install it, or find the settings in the TS template and remove them.
Try the template object browser to look for it (use the template tool, click to the site root, then use the drop down menu in the r/h pane to choose the Template Obect Browser.)
How does Typo3 know to generate a page when
it receives the first version of these two links?
Any page request that it doesn't understand will give a 404 error.

manupulate url in MVC2

On my page I have a lot of textpages and to save some time. I would like to make one controller/Action to handle all this sites. However, this gives me some problems with the URL (I dont want it to say something like http://MySite.com/DynamicPages/TextPages). I figure that I should be able to store all URL's in the database and then get the action to call from here.
I tried some differnt things and seached the web for solutions, but found nothing. Do anyone have some suggestions or know a article I can read about a solution.
I found uot I could use the routes for what I wanted.