[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Mod-Rewrite question

Posted on 2011-10-14
4
Medium Priority
?
197 Views
Last Modified: 2012-06-22
I want to hide file extensions and add a trailing slash to the url e.g. www.mysite.com/information.cfm
www.mysite.com/information/

My current htaccess looks like this:

Options +FollowSymLinks
RewriteEngine on
rewriteCond %{HTTP_HOST} ^mysite.com [NC]
rewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
RewriteRule (.*)/(.*)-(.*)-(.*)-(.*)\.html$ /details.cfm?ListId=$1&StrNumber=$2&StrName=$3&Cty=$4
RewriteRule ^(.*)\.html$ $1.cfm [nc]

Need help figuring this out! any help appreciated!
0
Comment
Question by:Bang-O-Matic
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:ddiazp
ID: 36970710
are all your extentions the same? (.cfm)?
0
 

Author Comment

by:Bang-O-Matic
ID: 36970727
yes they are all .cfm files
0
 
LVL 10

Accepted Solution

by:
ddiazp earned 2000 total points
ID: 36970759
Try this:

RedirectMatch 301 ^/(.*)\.cmf$ http://www.yourdomain.com/$1/
0
 

Author Closing Comment

by:Bang-O-Matic
ID: 36981573
Thanks!
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month19 days, 15 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question