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 ^(.*)$ http://www.mydomain.net%{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:

http://www.mydomain.net/sched/mycalendar/2012/51

currentYear = 2012
currentWeek= 51

the script is located at:

www.mydomain.net/sched/menu.php



--

Interestingly if I go to this URL:

mydomain.net/login/

or

www.mydomain.net/login/

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

advice please?


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

Return to Beginner's Corner

Who is online

Users browsing this forum: Alexa [Bot] and 3 guests

cron