rewrite same url using slash AND no slash


My client wants to be certain that if a site visitor types in a url with OR w/o a trailing slash i.e.

the same page will load.

currently my htaccess file has these rules-i can use one or the other, but not both -I NEED FOR BOTH TO WORK

RewriteRule ^/artists/(.+)$ /artists/artist.cfm?permalink=$1 [QSA]
RewriteRule ^/artists/(.+?)/ /artists/artist.cfm?permalink=$1 [QSA]
Who is Participating?
sjklein42Connect With a Mentor Commented:
Try using just this one rule:

RewriteRule ^/artists/(.+?)/?$ /artists/artist.cfm?permalink=$1 [QSA] 

Open in new window

The ? after the / (  /?$ ) should make it optional.
phillystyle123Author Commented:
perfect  - thanks!
phillystyle123Author Commented:
I posted a continuation of this question here:

because I'm having trouble getting the next url in my sequence to pull content from my database
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.