Changed component seo url problem

Hello all,

I modified a photo gallery component display to produce a more mobile responsive layout for my photos.
My problem is that the urls are not seo friendly and I don’t know if I should use php or apache mod_rewrite to fix them.

Here is some php code to create the links for both categories and images:

// create link for each category
echo '<a href="'.$serverpath.'/myforms/stargallery.PPGp.php?cid='.$catid.'&name='.$name.'" title="photos of '.$name.' - '.$author.'">'.$name.'</a><br />(number of photographs &nbsp;'.$CatalogPhotoCount[$id]['number_photos'].')';

// create link for each image
echo '<p><a title="'.$imgtitle.' '.$imgtext.'" rel="prettyPhoto[pp_gal'.$catid.']" href="'.$image_path_fs.'" height="'.$height.'" width="'.$width.'"><img src="'.$image_path_tn.'" alt="'.$imgtitle.'" height="100" width="100">'.$imgtitle.'</a></p>'."\

Here is a working link

As an example, clicking on the first group of photos

I would like to have the link for the catalog possibly display as:

and the link for the images to be displayed like:,%20%20Lesbos%20Greece

As this is a cms program, I assume that it might be possible to do this using php, not to sure about the coding, or apache url rewriting.

I have tried to create the apache rewrite rules but am not having any luck.

Any ideas, comments, etc?


Hmmm, some additional info.
I tried to use the following in htaccess but it didn’t work.

RewriteRule ^(.*)\\.php $1\\.php
RewriteRule ^(.*)\\.php$ $1.php [R,NC]


Solved, I used