Can't Pass Vars properly

New to mod_rewrite? This is a good place to start.

Can't Pass Vars properly

Postby Bobafett » Sat Dec 15, 2012 8:33 pm

I am trying to pass 2 vars in a URL but I keep getting my 404 error (fourohfour.php) script instead of the menu.php script executing:

Code: Select all
Options +FollowSymLinks
RewriteEngine On

#SecFilterInheritance Off
ErrorDocument 404 /sched/fourohfour.php

RewriteCond %{HTTP_HOST} ^(mydomain\.net/)$ [NC]
RewriteRule ^(.*)${REQUEST_URI} [R=301,L]

RewriteRule ^(login|logout|register|submit)/ /$1.php [QSA,L]

RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^sched/mycalendar/([^/]+)/([^/]+)/?$ /sched/menu.php?currentYear=$1&currentWeek=$2 [QSA,L]

the URL is:

currentYear = 2012
currentWeek= 51

the script is located at:


Interestingly if I go to this URL:


I get an actual "Not found" 404 error from the server (not my fourohfour.php script executing)

advice please?

Posts: 18
Joined: Fri Oct 05, 2007 4:48 pm

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 4 guests