This is an URL that created by GET
method in php
to send DATA
parameter to archives.html
page:
http://127.0.0.1/archives.html?option=com_archive&date=16-2-2014
Is there any way to clean this URL?
I want to do something like this (and I can send parameter too!)
http://127.0.0.1/archives.html/16-2-2014
(I am developing a component on joomla3)
You can use this rule in your root .htaccess:
RewriteEngine On
RewriteRule ^(archives\.html)/([0-9-]+)/?$ /$1/?option=com_archive&date=$2 [L,NC,QSA]
RewriteEngine On
RewriteRule ^([^/]*)$ /archives.html?option=com_archive&date=$1 [L]
This htaccess would do this job for you by url i assume this is joomla
this doc might help you
http://docs.joomla.org/Enabling_Search_Engine_Friendly_(SEF)_URLs_on_Apache
One way to do this in PHP:
$original_url = 'http://127.0.0.1/archives.html?option=com_archive&date=16-2-2014';
$new_url = explode('?', $original_url);
$clean_url = $new_url[0];