CrazyGaz
07-25-2008, 05:41 AM
Hi,
I have the following .htacess to allow for well formatted URLs, so instead of index.php?pg=x, I have /page/x.
RewriteEngine on
RewriteCond %{REQUEST_URI} !includes
RewriteRule ^page/([^/\.]+)/?$ index.php?pg=$1 [L]
A couple things I would like to change are:
Replacing the /page element with a variable so index.php?pg=x&hid=y is formatted as /y/x
Redirect index.php to a 404 error so that if people try to access /z/x when z is invalid, it will give a 404 page.
I have tried:
/home.
RewriteRule ^index.php 404.html [R]
Which doesn't work.
Any help is appreciated,
Gaz.
I have the following .htacess to allow for well formatted URLs, so instead of index.php?pg=x, I have /page/x.
RewriteEngine on
RewriteCond %{REQUEST_URI} !includes
RewriteRule ^page/([^/\.]+)/?$ index.php?pg=$1 [L]
A couple things I would like to change are:
Replacing the /page element with a variable so index.php?pg=x&hid=y is formatted as /y/x
Redirect index.php to a 404 error so that if people try to access /z/x when z is invalid, it will give a 404 page.
I have tried:
/home.
RewriteRule ^index.php 404.html [R]
Which doesn't work.
Any help is appreciated,
Gaz.