Hi all,

I am running through the book "PHP Advanced and Object Oriented Programming" by Larry Ullman and I am currently trying to use a mod_rewrite to change my GETs to look like standard URLs.

I am running the site on my localhost. My .htaccess file is being read (tested by putting garbage in to generate an error) but it isn't making the changes to the URL.

The .htaccess is as follows:

<IfModule mod_rewrite.c>

# Turn on the engine:
RewriteEngine on

# Set the base to this directory:
RewriteBase /Modular_Website/

# Redirect certain paths to index.php:
RewriteRule ^(about|contact|this|that|search)/?$ index.php?p=$1

</IfModule>

as taken from the book.

My file structure is /var/www/Modular_Website/index.php

Is there something I am missing from the .htaccess?

Thanks for any help offered.

I didn't change the URLs in the links.

No-one say a word.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.