I am newbie to the jsf.
Currently my application URL looks like
http://localhost/practice/pages/page1.xhtml
Question is how I rewrite the URL to make it like
http://localhost/practice/page1.xhtml
Basically I want to hide pages.
You can use prettyfaces
for rewriting url in jsf.it is open source and easy for use
Related
hope you can help me. i need a redirect from
/abc_company_detail.php?id=4 to detail/4/
So when I call the URL http://mydomain.com/abc_company_detail.php?id=4 then I got this pretty URL http://mydomain.com/detail/4/
You can use some PHP framework, and it will managed the URL for you. If you want to do it manually you have to configure .htacess file.
Try this link. .htaccess friendly URl
This kind of question had been asked before.
I am trying to make more friendly the urls of my joomla site. Currently, a typical url is like this: www.mysite.com/index.php?option=com_content&view=article&id=5&Itemid=10&hotel=182.
I would like to have a url like the following: www.mysite.com/hotel_name, where the value of hotel_name will be the value of the field 'hotel_name' in my DB! What are the required processes in the .htaccess file in order to achieve that?
After you turn on SEF, structure of url is set based on router.php file in component's folder. ( com_content/router.php. )
Or you can use component to make your own url http://extensions.joomla.org/extensions/site-management/sef
Depending on which webserver (Apache, Nginx, etc) you are using there is a tutorial for that
http://docs.joomla.org/Enabling_Search_Engine_Friendly_%28SEF%29_URLs
I am trying to remove the part from my url here is the url "http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/itemlist/category/3-category-2"
Now I want to remove "itemlist/category/" from the url so that url can be look link "http://example.com/custom_joomla_template-2.5.6/about-us/portfolio/3-category-2"
I am using default functionality of joomla i.e. SEF urls, I need to simplify it more I am new for the htaccess
Please suggest link for learning how to write rules for .htaccess file
Please help
Easiest thing is just to make a menu link somewhere that goes directly to category-2. That will set up the url correctly. It will also get rid of the 3-
how can i view the real URL without the functionality of .htaccess rewrite file ?
while using url rewrite with the .htaccess file you able to see sites like this :
example.com/i/154/b/6574534
i want to see the "source" of the url , such as
example.com/index.php?i=15&b=6574534
It sounds like you want to reverse the URL rewriting, without having server-level access to the server you are interested in. If this is the case, what you're asking for is not possible unless the server provides an API, a custom HTTP header in the response, another link on the page, or some other method to find the non-rewritten URL. The ability to do otherwise would defeat many purposes of URL rewriting.
I integrated Tuckey UrlRewrite filter in my JSF application. My URLs now look like:
http://localhost:8080/myapp/page
instead of
http://localhost:8080/myapp/faces/page.xhtml
The problem is that my JSF forms submits to the old url
http://localhost:8080/myapp/faces/page.xhtml
and I am getting a FacesFileNotFoundException.
How can I solve this issue?
You've to implement a custom ViewHandler and override the getActionURL() method to return the desired form action URL. That's where the forms get its action URL from. This is by the way also what PrettyFaces, the JSF URL rewrite solution, does. You may want to use it instead of reinventing the same wheel. It's by the way open source, so you could just peek around in its source code to see how they did it.