Home » Archive

Articles tagged with: url

Javascript »

[28 Jan 2011 | 3 Comments]

Here is a quick code to get the current URL of a page with Javascript:- var current_url = location.href; Here is another way:-

Magento »

[10 Dec 2010 | No Comment]

In your Magento shop URL, if you see “index.php” and wanted to remove it then here is the solution. – First of all, apache module ‘mod_rewrite‘ should be enabled. Check apache’s httpd.conf file this. – Then login to Magento admin panel – Go to System -> Configuration -> Web -> Search Engines Optimization -> Use [...]

PHP »

[11 Oct 2010 | 6 Comments]

Suppose you are on a page : http://example.com/category/php/ Now, the base URL or the main URL for the above link is : http://example.com Similarly, in the case of local machine (localhost), Suppose you are in the page : http://localhost/myproject/index.php?id=8 Here, the base or main URL is : http://localhost/myproject

PHP, Regular Expression »

[22 Apr 2010 | One Comment]

Here, I will be showing you a simple and easy one line code to format URL string with PHP. By URL string, I mean the url key in any Search Engine Friendly URL. I have used preg_replace function to do so.

Magento »

[20 Feb 2010 | 8 Comments]

Breadcrumbs are very useful for user navigation. Breadcrumbs for product page, category page, etc. are created by default Magento code. The following code will show breadcrumbs created by Magento. You can print the following code anywhere in php or phtml files.

Magento »

[23 Nov 2009 | 8 Comments]

The following code gives you the current url of the page you are:- $currentUrl = $this->helper(‘core/url’)->getCurrentUrl(); // Gives the base url of your magento installation $baseUrl = Mage::getBaseUrl();

Joomla »

[30 Aug 2007 | No Comment]

1) First you should make some changes in your configuration file of your Apache web server. Well, SEF in Joomla is for Apache web server only. Your server should have mod_rewrite enabled and it must allow .htaccess override. For doing this, follow the simple steps below: The configuration file named “httpd.conf” is located in the [...]