Welcome to WebmasterWorld Guest from 50.19.156.19

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Help with mod_rewrite

mod_rewrite

     

hcs420

7:17 pm on Apr 21, 2003 (gmt 0)

10+ Year Member



Hi everybody,
I require help on mod_rewrite. I read info about it and wrote .htaccess file.
I want url like this
www.xyz.com/hcs/abc
to go to
www.xyz.com/hcs/details.php?cat=abc

my .htaccess file looks like
RewriteEngine On
RewriteRule ^/(.*)$ /hcs/details.php?cat=$1

I uploaded .htaccess file in hcs directory. I am not able to access any file in hcs directory. It say 403 Forbidden access error.

Please help.

P.S. mod_rewrite module is loaded.

jdMorgan

7:40 pm on Apr 21, 2003 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



hcs420,

Welcome to WebmasterWorld [webmasterworld.com]!

www.xyz.com/hcs/abc -> www.xyz.com/hcs/details.php?cat=abc


Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/hcs/details\.php
RewriteRule ^hcs/(.*)$ /hcs/details.php?cat=$1 [L]

The RewriteCond prevents recursion.

If you have further problems, please post the appropriate data from your error log file.

More info: Introduction to mod_rewrite [webmasterworld.com]

HTH,
Jim