Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.htaccess rule writing + fixing trailing slash problem

Status
Not open for further replies.

u01jmg3

Technical User
Dec 16, 2005
8
GB
Hi,

just wondered if anyone could help me out with this small .htaccess problem and using mod_rewrite?

Basically I already have a working .htaccess file but I wondered if there was a way of writing a generic rule for what I have rather than writing a rule for every page of my site in my .htaccess. Here's what I mean...

----------------------------------------------------

(1.) Here's the current rule for a page on my site:
Code:
RewriteRule ^corporate_training$ 14_corporate_training.php

(2.) And here's the current rule for a particular section of a page:
Code:
RewriteRule ^corporate_training/anger_management$ 14_corporate_training.php?course=anger_management

Could this be made generic with one single rule for each?

----------------------------------------------------

Also if someone uses a trailing slash for any page of my site such as:


it gives an error - is there anyway of properly interpreting this in the same way:


is properly understood?

----------------------------------------------------

Thanks. Jonathan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top