htaccess and SEO Freindly File Names

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 1
Joined: Thu May 09, 2019 11:21 am

Thu May 09, 2019 11:24 am

I need your help. I am working in a WAMP localhost environment (WAMP 3.1.7X64bit) under Windows 10 Pro. As I am using seo-friendly file names for my site, I went into the Apache httpd.config file load the rewrite_module. My htaccess file has the following

RewriteRule ^resource-files/([-A-Za-z0-9_]+)$ /resource-files.php?category=$1 [L]

And from my website I can click the rewritten link like /resource-files/financial-information which does appear correctly on the URL line. However my php code
$get_category_title=($_GET['category'] ? GetSQLValueString($_GET['category'],"text") : "");

is returning an empty array (for $_GET). I am not sure why. If I open the resource-files.php and manually pass the ?category=financial-information or any other parameter the page display correctly. I promise this was working yesterday. I even restored from a backup and what was tested and approved yesterday is not working today. I have the exact same issue with all of my other RewriteRule statements. None are “passing” the parameter. The URL is right, the $_GET shows empty.
Post Reply