Tag Info

New answers tagged

0

Your logic appears to be reversed... you need to remove the OR flag at the end of the first RewriteCond directive. This looks like it should be an implicit AND: RewriteCond %{HTTP_USER_AGENT} !Version/[1-5] RewriteCond %{HTTP_USER_AGENT} !MSIE\ ([6-8]) In other words... if it's not Safari and it's not IE6-8 then proceed... If you OR these two conditions ...


2

You want to do a blanket redirect from one domain to another. Assuming Apache, put in your .htaccess file in the root directory of example0.com: RewriteEngine on RewriteRule ^(.*)$ http://www.example1.com/$1 [L,R=301] This will redirect all requests from 0 to 1 and keep the original request URI.


1

Yes you are correct though it is not because of the combination of /?. Before going into further detail it is worth noting that for it to be a valid URL there should be a maximum of one question mark (?) since this is a special character signifying the start of the query string. If you wish to have a question mark within your query string data then it must ...


0

I do not know WordPress at all. There may be an option for this. I would check the documentation. You should not need to do a redirect. Apache will do this for you. Otherwise, see if the /etc/apache2/mods-enabled/ directory has dir.conf and dir.load exist, then in your /etc/apache2/sites-enabled/ directory you should find a .conf file for your site. If you ...


2

On an apache server with mod_rewrite installed, you can add this code to your httpd.conf (main apache configuration file) and restart apache gracefully. RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} ^(.*)/$ [NC] RewriteRule ^(.*)$ %1 [NC,R=301,L] It will redirect all URL requests ending ...


1

You can externally redirect from the "ugly" (for want of a better term) URL to the "friendly" URL. However, you need to be careful of redirect/rewrite loops. One way of avoiding the rewrite loop is to check against THE_REQUEST - this contains the initial request header as sent from the client and is not changed as the rewrite engine rewrites the URL. This ...


0

If your canonical tag points to the URL with the extension then is what search engines will cache and index. So the URL with the extension will be in the search results. But you have to ask yourself this, If search engines cannot see any internal links with the exception of the canonical URL on your site, what value would they place on a page if the site ...


2

There's nothing to worry about here, since http://example.com and http://example.com/ are the same URL. The useragent has to include a path in the HTTP request (as per RFC 2616), so what it sends to the server will be GET / in either case. If you add the verbose flag to CURL this is quite easy to verify: $ curl -v http://example.com * Rebuilt URL to: ...


1

The best way to go about it is to transfer the files in the group folder at mysite.com to the document root folder at mysitegroup.org and make one of the HTML producing files by the name starting with index so that its executed. For example, make sure one file is index.htm or index.html or if you're using something like wordpress or another content ...



Top 50 recent answers are included