Where to place sitemap.xml in playframework 2.1 project - sitemap

Just for a quick question. Where does the sitemap.xml to place in play framework 2.1 project? do we need to configure the route file to the sitemap.xml?
Appreciate your help
thanks,
Best rgsd,
a1ucard

Either an Action generates dynamically your sitemap.xml, then you have to configure the URL like this:
GET /sitemap.xml controllers.Application.sitemapGenerator
Either you generate your sitemap.xml by hand, then put it in the public folder of your Play app, and then add an Asset route:
GET /sitemap.xml controllers.Assets.at(path="/public", file = "sitemap.xml")

Related

Laravel - how to protect /public/files/uploads/ from web acces by customers

I've got a question.
the admin and employee can upload stuff into /public/files/uploads/
and the customers are only allowed to see a part of the files in uploads.
but when I login as customer and visit: /public/files/uploads/
I can open and view every file.
I would like to know how to protect this from customers, like when they try to open /public/files/uploads/ they redirect back to the home view.
This would need some sort of .htaccess but I can't seem to figure out how to get it working.
Any help would be appreciated.
Thanks in advance.
Try to put an empty index.html file in this folder.
Also, are your normal URLs contain public? If so, you have wrong web server configuration and you should point your web server (Apache, Nginx) to a public directory instead of Laravel project's root folder.

Liferay blog url-rewriting

I am using liferay 6.1 and i have already shortened the url of the blog using url rewriting but still i have the problem in the url.
The url gets showed up like this localhost:8080/blog/-/blogs/testing, but i want to change the url to this localhost:8080/blog/blogs/testing inshort i want to remove the - from the url.
Any help will be apprecicated, I am trying this from very long but cannot find the solution.
You could try doing this using the urlrewrite.xml file that you can use in Liferay, but a better option would be to put Liferay behind an Apache Reverse Proxy and use the rewriting capabilities of that: http://httpd.apache.org/docs/2.0/misc/rewriteguide.html

Multistore, template code from code/local/

I'm prepare a multistore on magento.
I have a three template, and I was change a few file from code/core and replace in code/local, but only one template take a changing code from code/local
a rest template should take file from code/core/
Now every template take files from code/local/
How can I'm set app to resolve a problem
thx for help
You should NOT overwrite core files in local. Better try to develop your own module which rewrites the core functionality. In this module you can integrate a configuration, so it's only used for one store view, and not for all.

How to add custom code to the 'system' folder of CodeIgniter?

I am looking into building my own CMS / extended framework on top of CodeIgniter, and I was wondering how to structure it to keep code out of the application folder. I noticed that in a typical CI set up, the file structure looks like this:
application/ //code for your application
system/ //CodeIgniter core
index.php
However, in PyroCMS, They have used the following structure:
application/ //code for your application
system/
--cms/ //PyroCMS core
--codeigniter/ //CodeIgniter core.
How do I accomplish a similar result?
To emulate that structure just edit the index.php constants:
APPPATH
BASEPATH
#WebweaverD has provide you a good solution to improve your application usgin HMVC. I will give you another.
How about something like this:
-system/ //CI core
-index.php //manage the front_end requests
-acp.php //manage the back_end requests
-apps/ //applications dir
--back_end/ //only "admin" controllers, libraries, config. No views here
--frond_end/ //only "user" controllers, libraries, config. No views here
--acp/ //views for back_end
--themes/ //views for front_end
All above can be implemented as you want only extending the necessary core files.
The short answer is that everything starts from index.php, this is where core/CodeIgniter.php is included and it is also where application and system paths are set (retrieving values from config).
I think that pyro cms actually sets /system/cms as the application folder, presumably they have written code which looks at the presented application folder for content and processes it.
Another approach is to use wiredesigns modular HMVC:
https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc
This will allow you to separate your code out into modules. Just have a folder called cms containing all your cms modules and another folder to build your custom content on top.
You set the path to your modules folder in the config so if you wanted your cms code in the system folder you could set the path to your modules folder there and build on top using codeigniter in the standard way, perhaps adding a hook before or after your controller is loaded to call the cms core.
Mine is just a suggestion but you can easy fork pyrocms and build your own cms on it.
PyroCMS will deprecate codeigniter in the next version so you can keep their code and fix it where you need and modify it as you want

Magento new store view as subpath of URL

I was advised by an SEO specialist that I should add a /aus/ sub-folder to my Magento installation for geo-target specific purposes.
So what I am trying to achieve is to add the same version of my store in a /aus/ sub-folder.
So basically that it would look something like this:
www.mystore.com/ <- my current store
www.mystore.com/aus/ <- for geo-targeting specific purposes
I do not want to run the /aus/ version on a separate installation or separate language, basically it should just add /aus/ to my current store and replicate all links there.
What is the best way to have this handled? Some recommendations or advises would be greatly appreciated.
Why not just add the store into the URL via configuration? Magento already has configuration for this. See System > Configuration > General > Web > Add Store Code to Urls.
Instead of yourwebsite.com/customer/account, it will now generate URLs like yourwebsite.com/<your_store_code>/customer/account.
Do note that all of your custom templates and modules should properly use the getUrl() Magento methods to build URL, otherwise these URL will not contain the storecode and end up not working.
add a new website "aus"
and then create new folder with index.php that run "aus" store

Resources