New answers tagged

0

You could add another condition (RewriteCond directive) to prevent the redirect happening when an IP address has been requested: RewriteCond %{HTTP_HOST} !^www\. RewriteCond %{HTTP_HOST} !^\d RewriteRule (.*) https://www.%{HTTP_HOST}/$1 [R=301,L] When the host does not start with www. and does not start with a numeric digit. Note that you'll need to ...


1

As Google never will return more than 1000 results, my key was from standalone Perl script to query ( with the help of Lynx --accept-cookies ) several segments for site:myweb.xxx in the way https://www.google.es/search?q=site:www.955170000.com+%2B+"AA"&num=50&filter=0 The script calculates the string for search, now is "AA" , next will seek "AB" ...


1

If the query string is irrelevant then it can simply be ignored. (You can't match the query string anyway with the RewriteRule directive.) Try the following in your root .htaccess file to redirect the request: RewriteEngine On RewriteRule ^index.php/path/some-path/some-subpath$ /category/? [L,R=301] In per-directory .htaccess files, the URL-path matched ...


0

I think the software is missing the point of 301 and 302 redirects completely. Their purpose is to act as signposts to actual "documents" with actual content the client is requesting. 301 means the document has permanently moved to a different url 302 means the document has temporarily moved to a different url The scenario you are describing sounds more ...


1

Redirecting from the root URL to have a different URL for the homepage is fairly common practice. Twenty years ago it was considered bad practice because browsers put redirecting URLs into the browser history. (Netscape 4, I think, was the last browser to do this.) Using redirects would "break" the back button. Users would hit "back" and get the ...



Top 50 recent answers are included