How to override base url of joomla - joomla

I want to override the root Url of a Joomla site. JURI::base(true) is the
problem because it returns / . How can I change this?
http://docs.joomla.org/JURI/root lets me override the root, but components like
the breadcrumb and logout use something else, probably JURI::base().
thanks

Related

Wrong url in magento paging

I have a problem regarding paging of the custom module. When i click on the next page the it take the url as localhost/magento/fme-support/index/index/url/BC/?p=1, but this url doesn't work properly, the correct URL is localhost/magento/fme-support/category/BC/?p=1.
Please suggest me how and i change this url.
Thanks.
Try making url rewrites off
If it doesn't work there is some issue with your extension you have installed
Check for redirect in your extension
The "index" in the URL means you are calling the index controller of the module.
Magento module URLs work like this
http://magento_installation.com/(storeview)/moduleMame/controllerName/functionName/

joomla, change alias in com_menus

Can someone pinpoint me to where alias in com_menus is changed because I need to add to url few values and Joomla is striping & and % etc
i have something like this :
mysite.com/going?3DPA%26tt%3DF%26sd%3D*3%26ed%3D*20%26drf%3D6%26drt%3D15%26a%3D2%26at%3D33554432%26st%3DPA%26sp%3D2
and Joomla is creating this:
mysite.com/going-3dpa-26tt-3df-26sd-3d-3-26ed-3d-20-26drf-3d6-26drt-3d15-26a-3d2-26at-3d33554432-26st-3dpa-26sp-3d2
How do I prevent it from changing anything?
The menu alias is determined by Joomla AND the component's router.php.
My best guess to get you out of this issue is just base64encode your param so Joomla sees it as a single param. Then add it to the view default.xml with a string value, this way Joomla should be able to build the SEF route; just check your router.php and debug it if it's not behaving as expected.
In order to have SEF routing correctly, you will need to create a menu item pointing to the view; if you don't need it, just hide it in a hidden menu.

Is there a way to change login page URL in Magento?

I want to change the URL for customer login in Magento.
From the URL,
www.mydomain.com/customer/account/login/
To something like this:
www.mydomain.com/login
How can I do this?
I have not tried this method yet but you can achieve this with url rewrite.
Go to url rewrite and add custom url rewrite, give unique id path.
And in request path give www.mydomain.com/login this url and in target path give this url www.mydomain.com/customer/account/login/ magento internally consider target path for its use.
For more Info on url rewrite you can see here http://www.magentocommerce.com/wiki/modules_reference/english/mage_adminhtml/urlrewrite/index
http://blog.beetleweb.com/2012/10/creating-custom-magento-url-rewrites/
1)Login to magento admin panel
2)Goto catalog->URL Rewrite Management
3)In Requestpath give www.mydomain.com/login
4)In Targetpath give www.mydomain.com/customer/account/login/

Custom URL for Magento's basket page

I'd like to implement custom URL for our Magento's basket. Magento out-of-the-box url paht is /checkout/cart but client request /checkout/bag.
I tried to somehow
* URL rewrite management in backend - it works, but I need to update all occurences in code to new url, because $this->getUrl('checkout/cart') doesnt translate into checkout/bag
* also I tried to follow some advices from http://alanstorm.com/magento_dispatch_rewrites_intro but basicaly it doesnt help me too.
* also I tried example from this post http://phprelated.myworks.ro/two-add-to-cart-buttons-with-different-redirect-actions-at-once-in-magnto/
So, is there any way how can I rewrite translation from path 'checkout/cart' into checkout/bag without updating all ocurrences in our templates and classes $this->getUrl('checkout/cart')
Any solution depending on web server architecture are not the ultimate solution.
I found solution
1) I rewrited model core/url to have desired output
EDIT 1 - sample implementation https://gist.github.com/jaromirmuller/132cdd9378e5b1018170
2) Added url rewrite into config.xml which rewrites url path from /checkout/bag to /checkout/cart
<global>
<rewrite>
<mynamespace_mymodule_checkout_cart>
<from><![CDATA[#^/checkout/bag#]]></from>
<to>/checkout/cart</to>
</mynamespace_mymodule_checkout_cart>
</rewrite>
</global>
3) Added url rewrite into Catalog > URL rewrite management which handles if anyone comes to /checkout/cart then he's redirected to /checkout/bag paht which is correct.
These 3 points makes site consisten and working without any issues. That's the easises way without rewriting tons of templates and classes.
The way Url Rewrites work means that you have some url test.com/some on the page and when you click on it, you'll get test.com/some2 instead. So Rewrites do not change the actual anchor link - they change the destination of that link to the new recipient.
There is no easy solution which will change all of the anchor links to the new ones (aside from parsing and replacing links on each page - which is not preferable).
So if you want to leave anchor links as they are and get the new Url after user clicks on the link, you should go with Url Rewrites. Though if you want to change the actual links on the page, you need to search for all occurrences and change them manually.
Mage::getUrl() is not a fabric which operates with aliases (like Mage::getModel()) - you'll get from it what you have inserted, and the only way to change the outcome Url is to change income parameters.
You can do it using apache url rewrites. Something like
RewriteRule ^/checkout/cart(.*)$ /checkout/bag$1 [R=301,NC,L]
This answer works for changing the wishlist name by changing the frontend routers in app/etc/local.xml. Maybe it can be adapted for your uses?
Change wishlist url in magento
To manage more url translation You can use this module:
http://www.magentocommerce.com/magento-connect/catalog/product/view/id/18160/

joomla rename component url using htaccess

I'm building an eshop using Joomla 2.5 and a commercial component for a guy who wants to have multiple vendros and I'm stuck on how to change the component's url.
What I want to change is the url that is displayed when the users passes from a link with his mouse.
For instance, the component has a SEF function which rewrites urls and makes them like that:
http://www.site.com/componentname/products/productname-productid-productcategoryid-vendorid.html
http://www.site.com/componentname/catalog/categoryname-categoryid-numberofpage.html
and what I want is to make it:
http://www.site.com/shop/products/productname-productid-productcategoryid-vendorid.html
http://www.site.com/shop/catalog/categoryname-categoryid-numberofpage.html
So when a user passes over a link it will show him the new url. Is this possible with .htaccess and rewrite rules or this can only be done through the component only? I'm asking this as the component is encoded with ioncube so I can't do it myself.
Thanks in advance!
While you can use .htaccess to rewrite any URL it won't work with Joomla! as the SEF URL is created by JRoute which uses a combination of the core route function and the route.php for the component.
The URL segments are used to find the right component to handle the request, so to change the way the URL is built you would have to modify the route.php of the component (and obviously other parts as well).
For more information on how SEF support works, read this on docs.joomla.org

Resources