absolethe
January 30th, 2005, 00:21
This looks really easy in the tutorials but I am getting a 404 error. I've tried it several different ways.
RewriteCond %{REQUEST_URI} !^/Sections/([A-Za-z]+)/([A-Za-z]+)/([0-9]+)(/)?$
RewriteRule (.*)/preview.php?s=$1&p=$2&i=$3 [L]
RewriteCond %{REQUEST_URI} !^/Sections/([A-Za-z]+)/([A-Za-z]+)(/)?$
RewriteRule (.*)/pages.php?s=$1&p=$2 [L]
RewriteCond %{REQUEST_URI} !^/Sections/([A-Za-z]+)(/)?$
RewriteRule (.*)/pages.php?s=$1 [L]
(with and without the ! and $ and with and without a space after (.*))
RewriteRule ^/Sections/([A-Za-z]+)/([A-Za-z]+)/([0-9]+)$ /preview.php?s=$1&p=$2&i=$3
RewriteRule ^/Sections/([A-Za-z]+)/([A-Za-z]+)$ /pages.php?s=$1&p=$2
RewriteRule ^/Sections/([A-Za-z]+)$ /pages.php?s=$1
In various orders with and without (/)? before the $ and without and without the / after the ^.
If I test using http://URL/Sections/Design I get a file not found error. Tried it both on my localhost and my live site.
'Bout to shoot myself in the foot.
RewriteCond %{REQUEST_URI} !^/Sections/([A-Za-z]+)/([A-Za-z]+)/([0-9]+)(/)?$
RewriteRule (.*)/preview.php?s=$1&p=$2&i=$3 [L]
RewriteCond %{REQUEST_URI} !^/Sections/([A-Za-z]+)/([A-Za-z]+)(/)?$
RewriteRule (.*)/pages.php?s=$1&p=$2 [L]
RewriteCond %{REQUEST_URI} !^/Sections/([A-Za-z]+)(/)?$
RewriteRule (.*)/pages.php?s=$1 [L]
(with and without the ! and $ and with and without a space after (.*))
RewriteRule ^/Sections/([A-Za-z]+)/([A-Za-z]+)/([0-9]+)$ /preview.php?s=$1&p=$2&i=$3
RewriteRule ^/Sections/([A-Za-z]+)/([A-Za-z]+)$ /pages.php?s=$1&p=$2
RewriteRule ^/Sections/([A-Za-z]+)$ /pages.php?s=$1
In various orders with and without (/)? before the $ and without and without the / after the ^.
If I test using http://URL/Sections/Design I get a file not found error. Tried it both on my localhost and my live site.
'Bout to shoot myself in the foot.