Page is a not externally linkable
arturito - 11:38 am on Oct 5, 2009 (gmt 0)
I'm echoing $_GET['s'] well I'm echoing $_GET['query'] as 's' is being rewritten to 'query'. I also think that I don't need forward slash before search.php since my htaccess defines RewriteBase. All other rules are working fine. This is my htaccess: RewriteRule ^article/a([0-9]+)//?$ article.php?id=$1 [L] RewriteRule ^profile/p([0-9]+)//?$ p.php?id=$1 [L] RewriteRule ^autosearch//?$ quicksearch.php?$ [L] RewriteCond %{QUERY_STRING} &?s=([^&]+) RewriteCond %{QUERY_STRING} &?s=([^&]+) RewriteCond %{QUERY_STRING} &?s=([^&]+) ErrorDocument 404 [mydomain.com...] changing it to #2 #3 didn't help either. In both cases as I enter urls: [mydomain.com...] #I get my error.php [mydomain.com...] # echo $_GET['query'] returns 'john', $_GET['pageno'] returns nothing [mydomain.com...] # echo $_GET['query'] returns 'john', $_GET['sort_order'] and $_GET['pageno'] returns nothing :(
Sorry I meant your suggestion didn't work.
RewriteEngine On
RewriteBase /
RewriteRule ^search/([^/]+)$ search.php?query=%1 [L]
RewriteRule ^search/([0-9])/([^/]+)$ search.php?query=%1&pageno=$1 [L]
RewriteRule ^search/([0-9])/(dateŠazŠza)/([^/]+)$ search.php?query=%1&pageno=$1&sort_order=$2 [L]
#1
RewriteCond %{QUERY_STRING} &?s=([^&]+)
RewriteRule ^search/([^/]+)/$ /search.php?query=%1 [L]
RewriteCond %{QUERY_STRING} &?s=([^&]+)
RewriteRule ^search/([0-9])/([^/]+)/$ /search.php?query=%1&pageno=$1 [L]
RewriteCond %{QUERY_STRING} &?s=([^&]+)
RewriteRule ^search/([0-9])/(dateŠazŠza)/([^/]+)/$ /search.php?query=%1&pageno=$1&sort_order=$2 [L]