0

I have the following rewrite rule in my .htaccess file:

RewriteRule ^books$ /my/directory/pro/books [NC,L] 

It works fine as long as the user does not add a trailing slash, e.g.

mysite.com/books // works mysite.com/books/ // doesn't work 

How can it be modified to work with or without the trailing slash?

2
  • Note that mysite.com/books// is a valid url for the same resource. Commented Apr 6, 2011 at 21:42
  • Hmm... I keep getting 404 error. Commented Apr 6, 2011 at 22:09

1 Answer 1

2
RewriteRule ^books/?$ /my/directory/pro/books [NC,L] 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.