Adsmanager (joomla) - Rewrite urls any ideas?

Discuss practical ways rearrange URLs using mod_rewrite.

Adsmanager (joomla) - Rewrite urls any ideas?

Postby smanager3 » Wed Nov 12, 2008 4:58 am

Hi all thanks for taking time out to read my post.

Basicly i have a site which is using the adsmanager component in joomla.

Im learning as i go with with mod_rewrite so no wonder i cant get it to work.

for an example i want to change:

http://www.plantsaleonline.com/index.php?option=com_adsmanager&page=show_result&category_choose=&ad_attachments=6

to

http://www.plantsaleonline.com/attachments/booms.html


I am using apache, and the mod_rewrite is installed.

Any ideas, or another simlar post with a potential answer is much apreciated.
smanager3
 
Posts: 3
Joined: Wed Nov 12, 2008 4:47 am

Postby richardk » Wed Nov 12, 2008 12:40 pm

Is it always /attachments/something.html?
Where has booms come form? Is it related to 6? If it is, see FAQ: How to change a numeric ID into a name/title.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby smanager3 » Thu Nov 13, 2008 2:59 am

Thanks you for your quick reply richardk.

attachments is a option which is received from a search form which i have made in adsmanager, it can change depending on that the user is searching for e.g

machine type (&ad_machinetype=10)

and the ideal url would be

http://www.plantsaleonline.com/machine_type/Excavators

i will have a look at that post on changing the numeric id, to name/title.
smanager3
 
Posts: 3
Joined: Wed Nov 12, 2008 4:47 am

Postby richardk » Thu Nov 13, 2008 7:48 am

For /attachments/6-booms.html and /machinetype/10-Excavators.html
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^attachments/([0-9]+)-[^/]+\.html$ /index.php?option=com_adsmanager&page=show_result&category_choose=&ad_attachments=$1 [QSA,L]
RewriteRule ^machine_type/([0-9]+)-[^/]+\.html$ /index.php?option=com_adsmanager&page=show_result&category_choose=&ad_machinetype=$1 [QSA,L]

Read the FAQ about getting rid of the ID. It will need to go before any other Joomla mod_rewrite.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby smanager3 » Fri Nov 14, 2008 5:42 am

May be im doing something wrong here but i have tried those two but no joy.

all i get is the sites custom 404 error.???
smanager3
 
Posts: 3
Joined: Wed Nov 12, 2008 4:47 am

Postby richardk » Fri Nov 14, 2008 1:09 pm

When you go to /attachments/6-booms.html?
What is your full mod_rewrite?
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 6 guests

cron