Forum

Thread tagged as: Question, Problem, Addons

Gallery Clean URL's

Is it possible to have clean url's using gallery app?

Stephen Wild

Stephen Wild 3 points

  • 5 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

Yes, we don't dictate your architecture so you can do whatever you need to.

Sorry I haven't explained myself properly...

I currently use this code on all my perch news/blogs, so that they have clean url's

<IfModule mod_rewrite.c>  
    RewriteEngine on  
    RewriteRule ^news/([a-zA-Z0-9-/]+)$ /news/post.php?s=$1 [L]
</IfModule>

I have tried adapting it a few different ways to get it to work for my gallery pages, but with no success.

    RewriteRule ^projects/$ /projects/album.php?s=$1 [L]

It is posible?

Rachel Andrew

Rachel Andrew 394 points
Perch Support

yes it is possible, you need to make sure you correctly rewrite the URLs.

Drew wrote a guide to .htaccess over at 24 ways and this isn't specific to Perch, you need to ensure that your rewrite rules resolve to the correct paths.

https://24ways.org/2013/url-rewriting-for-the-fearful/