Hi,
I have some rewrite rules which cause links such as <a href="Coaches">Coaches</a>
to redirect to a specific page which works fine, but if I have a link to a file that contains the same name then it will also redirect.
http://www.mywebsite.com/uploads/web_pages/3CD%20R%20and%20R%20Coaches.pdf
How should "RewriteRule Coaches index.php?page_id=262" be written to work for the first link but not the other?
Thanks in advance for your feedback.
Options +FollowSymLinks
Options +Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} !^
www.mywebsite.com$ [NC]
RewriteRule ^(.*)$
http://www.mywebsite.com/$1 [L,R=301]
RewriteRule ([0-9]+)(.*)\.html$ index.php?page_id=$1
RewriteRule Home\ Page index.php?page_id=1
RewriteRule Club\ Details index.php?page_id=14
RewriteRule Coaches index.php?page_id=262
you should use following
RewriteRule ^Coaches(.*) index.php?page_id=262
Hope this will help you.
Thank You.
Amar Bardoliwala