.htaccess problem with non-full-path requests
Posted: Sat Mar 31, 2007 5:23 pm
Basically I am trying to have articles/category/article.php to pump to another file as indicated with the rewrite below.
RewriteRule articles/(.*)/(.*).php /articles.php?cat=$1&article=$2
The problem is that I still want a request that i would ideally like that also requests where only category is given, but no article id, also are handled by the script. It would be great if there is a way to do this in the .htaccess, but otherwise. Could someone recommend how I would do it using PHP? I mean, I could probably somehow make the .htaccess point every articles* request to the articles.php, right?
RewriteRule articles/(.*)/(.*).php /articles.php?cat=$1&article=$2
The problem is that I still want a request that i would ideally like that also requests where only category is given, but no article id, also are handled by the script. It would be great if there is a way to do this in the .htaccess, but otherwise. Could someone recommend how I would do it using PHP? I mean, I could probably somehow make the .htaccess point every articles* request to the articles.php, right?