Forum Moderators: phranque

Message Too Old, No Replies

mod rewrite troubles

         

kkonline

5:17 am on Sep 5, 2007 (gmt 0)

10+ Year Member



RewriteEngine On
RewriteRule ^/pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/$ /pages.php?sid=$1&catid=$0&page=$1&mode=$1

I think i wrote something wrong i want
[localhost...] to show the contents of page [localhost...]

I have gone through some of the forum discussions and know that rewrite and re-direction are required to prevent duplicate entry of url

then how to do this?

kkonline

10:57 am on Sep 5, 2007 (gmt 0)

10+ Year Member



AllowOverride All is enabled in .httpd.conf

Below is the contents of .htaccess
Code:


Order deny,allow
allow from 127.0.0.1
deny from all

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)(/*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4
RewriteRule ^pages/([0-9]+)/([0-9]+)/([0-9]+)/([0-9]+)/(.*)$ pages.php?sid=$1&catid=$2&page=$3&mode=$4

[localhost...] gives me 404 Not Found, What to do? What all can be done to make it work.

jdMorgan

2:56 pm on Sep 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



*Where* is this .htaccess file located -- in the "home page" directory, in the "/dir" subdirectory, or in "/dir/pages"?

Jim