mod_rewrite issues - just does not work

  • tomaddison
  • Born
  • Born
  • tomaddison
  • Posts: 2
  • Loc: United Kingdom

Post 3+ Months Ago

Hi,

I'm new to mod_rewrite, but realise it would be great to help give my small website some nicer looking addresses.

It's a small golf society website, and rather than say courses.php?courseid=12 , for example, I want it to say courses/12 , remembering this is for test purposes and I'll probably replace the 12 with something more meaningful.

I'm on shared hosting, and I can see that mod_rewrite has been loaded when I use phpinfo()

Am I missing anything obvious. I keep reading that I should use the [R] flag to get the browser to change the address in the address bar, but then the tutorial I read didn't use it

here is what I have in my .htaccess file

Options +FollowSymLinks
RewriteEngine On

RewriteRule ^courses/12$ courses.php?courseid=12 [NC,L]


Can anybody offer any advice? I've put a preemptive support ticket into the web hosting people, but just looking for other advice in case I'm doing something obviously wrong

Many thanks
Tommy
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • tomaddison
  • Born
  • Born
  • tomaddison
  • Posts: 2
  • Loc: United Kingdom

Post 3+ Months Ago

I think I might have got this sorted for the time being.
I was misunderstanding how it applies the rule I've presented.

I believe I'm right in thinking that I then need to employ other methods to then get the address in the browser address bar to appear as the revised link?

Anyways, this is sufficient for now. I was just investigating it for when I finish the site and begin work on the next revision; I'll be implementing it all then.

If anybody wants to offer any advice in the meantime, it's greatly appreciated, anything you think may be applicable.

Thanks
Tommy

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 32 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.