RewriteRule url to php
Posted by: BermudaLamb (207.218.185.---)
Date: September 28, 2016 09:22PM

I'm running WAMP on a WIndows 7 PC. I have the rewrite_module checked in the Apache modules.

I'm trying to send

/category/testit/12347

to

category_id.php?name=testit&id=12347


category_id.php is in by base directory. The rewriterules are:

RewriteEngine On

RewriteRule ^category/([^/]*)/([\d]+)$ /category_id.php?name=$1&id=$2 [NC,L]

I've tried it with and without the leading /, nothing works. The access.log reports:

::1 - - [28/Sep/2016:13:45:54 -0500] "GET /category/testit/12347 HTTP/1.1" 404 4

Options: ReplyQuote
Re: RewriteRule url to php
Posted by: Otomatic (Moderator)
Date: September 29, 2016 10:28AM

Hi,

This forum is not intended to show you how to use all things for Apache.
The Apache documentation is there for this : [httpd.apache.org]

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.