Removing Joomla Query String

Discuss practical ways rearrange URLs using mod_rewrite.

Removing Joomla Query String

Postby roses » Tue Oct 14, 2008 11:02 pm

Dear all,

Can anyone help me, please?
I have a website with name, for example http://www.a.com/index.php?option=com_***** (followed by a very long query string).
The problem is I want the URL that will be displayed in address bar only http://www.a.com/
Can anyone give me what kind of regex I should use? I've tried lots of things, but I just don't understand the regex rules.
Thank you in advance.
roses
 
Posts: 3
Joined: Tue Oct 14, 2008 10:22 pm

Postby richardk » Wed Oct 15, 2008 6:42 am

For your site index or every URL on your site?

For your site index
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^$ /index.php?option=com_... [QSA,L]


You have to use a frame for all the URLs. You might want to look at Joomla's SEF URL option instead.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby roses » Thu Oct 16, 2008 2:13 am

I mean it for every URL on my site.
So whatever the string that follows after http://www.a.com/ (whether it is the index.php or even the query string) will be disappear, and at address bar there is only http://www.a.com/.

Can I afford this through some modification in .htaccess file? Actually I already checked Joomla SEF URL option, but it's not what I really need.
Thank you for your very quick response.
Thank you for helping me.
:)
roses
 
Posts: 3
Joined: Tue Oct 14, 2008 10:22 pm

Postby richardk » Thu Oct 16, 2008 6:51 am

This cannot be done with mod_rewrite. It can be done with a <frame> but it is a bad idea.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby roses » Thu Oct 16, 2008 6:31 pm

Hey, thanks for your reply.

I already think about the frame before (my first options), but I dropped that solution, because if I chose to use frame it means I have to edit all the links in joomla, and it takes time, editing my template so, it will included the frame.

Anyway, thanks for helping me. I'll try to figure out other way..
:D
Thank you very much.
Arigato gozaimasu.
Danjke.
Kamsa hamnida.
Terima kasih.
roses
 
Posts: 3
Joined: Tue Oct 14, 2008 10:22 pm


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 26 guests

cron