Forum Moderators: phranque
[edited by: jdMorgan at 4:02 am (utc) on May 20, 2010]
[edit reason] example.com [/edit]
RewriteCond %{QUERY_STRING} ^name=(www\.)?([^.:/]+(\.[^.:/]+)+)\.?(:[0-9]{1,5})?(/.*)?$
RewriteRule ^search\.php$ http://www.example.com/[b]%2?[/b] [R=301,L]
RewriteCond %{HTTP_REFERER} ^((www\.)?example\.com.*)?$
RewriteCond $1 !^(search\.php|robots\.txt|(403|404|410)error\.html)$
RewriteCond $1 !\.(gif|jpe?g|png|ico|css|js|xml|swf|flv|avi|pdf)$
RewriteRule ^(.*)$ search.php?name=$1 [L]
[edited by: jdMorgan at 1:23 pm (utc) on May 20, 2010]
this consider everything as value and captured in GET. if I exclude some file say search.html then it
wont capture the value search.html fires.
# Externally redirect all direct client requests
# for script URL to search-engine-friendly URL
RewriteCond %{THE_REQUEST} ^[A-Z]+\ /search\.php\?name=(https?://)?(www\.)?([^.:/\ ]+(\.[^.:/\ ]+)+)\.?(:[0-9]{0,5})?(/[^\ ]*)?\ HTTP/
RewriteRule ^search\.php$ http://www.example.com/%3? [R=301,L]
#
# Internally rewrite search-engine-friendly URL requests
# to script filepath unless previously rewritten
RewriteCond %{HTTP_REFERER} ^((www\.)?example\.com.*)?$
RewriteCond $1 !^search\.php$
RewriteRule ^(https?:)?(www\.)?([^.:/]+(\.[^.:/]+)+)\.?(:[0-9]{0,5})?(/.*)?$ search.php?name=$3 [L]