Forum Moderators: phranque

Message Too Old, No Replies

mod_rewrite

mod_rewrite

         

selliko

9:58 pm on May 3, 2004 (gmt 0)



Hi im trying to turn a dynamic URL to a static url using mod_rewrite. I used the the tool at webmaster toolkit to create the code below and inserted it into the .htaccess file. I then uploaded it but nothing happens.

The link looks like: [ses-training.com...]

and i want it to look like:
[ses-training.com...]

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule course/(\.*)/(\.*)/$ /course\.asp?$1=$2

Im using asp chillsoft on an apache server so i do not know if this is causing the problems.

jdMorgan

11:05 pm on May 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



selliko,

Welcome to WebmasterWorld [webmasterworld.com]!

Your regular expressions are probably incorrect.

(\.*) means "create a backlink from a substring matching any number of literal periods" -- I doubt that's what you wanted.

([^/]+) would be more appropriate, I suspect.

I'd recommend a quick review of the Apache mod_rewrite documentation [httpd.apache.org] and this regular expressions tutorial [etext.lib.virginia.edu].

Jim