Redirect deleted page URL ?p=xxxx

You might not use that form of permalink, but it still exists. By default, unless you are using a tool like JetPack, WordPress uses the default permalink as the post’s “shortlink.” So if your regular post title is http://mysite.com/2011/11/my-really-cool-long-post-title and the post’s ID is 32, the same post is still accessible as http://mysite.com/?p=32. If you’re … Read more

Extra Text in URL

The extra “nathantornquist” in the URL happens when you don’t have the trailing slash on http://www.nathantornquist.com/wordpress. What are the contents of your .htaccess file?

Redirect from ip to domain

WordPress does not create a complete new .htaccess. It just rebuilds the part between the WordPress markers: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Any rule placed outside of this block … Read more

Redirect user on first visit based on geographical location

I would say use a $_SESSION[‘var’] var or $_COOKIE[] to check if the link is clicked. Looks like the plugin is calling the geo_redirect_client_location function and then redirecting. function geo_redirect_client_location(){ $geo = new Geo_Redirect(); $geo->checkIfRedirectNeeded(); } I’m not familiar enough with the plugin but I would so something like: <a href=”https://wordpress.stackexchange.com/questions/89111/example-intenational-sitelink.com/?show_intl=true”>Link on US site to … Read more

Use two different index pages

You can’t set DirectoryIndex to prototype.php and expect everything else to work correctly. DirectoryIndex is not just a “landing page”. A lot of requests go through that file. I think you are making this more complicated than it needs to be. Put your code for prototype.php into a WordPress custom theme template file. Create a … Read more

Changing theme = change home page for mobile visitors?

You can make a simple function for this, check if is mobile (http://codex.wordpress.org/Function_Reference/wp_is_mobile). and redirect with wp_redirect() http://codex.wordpress.org/Function_Reference/wp_redirect add_action(‘wp_head’, ‘redirect_mobile’); function redirect_mobile() { if ( wp_is_mobile() ) { wp_redirect( ‘http://url’ ); exit; } } This is untested but should work. Add it to your themes functions.php file.

Will deleting WP’s code in .htaccess cause problems?

Adding the [L] flag to the [NC,R=301] piece (ie, [NC,R=301,L]), which tells the RewriteEngine that the RewriteRule is the last one for the block of RewriteConds, apparently solved the problem. RewriteEngine on RewriteCond %{HTTP_HOST} name.com RewriteCond %{REQUEST_URI} ^/(1[0-9]{3}|200[0-9]|201[0-3]) RewriteCond %{REQUEST_URI} !/2013/12 RewriteRule ^([0-9]{4})/([0-9]{2})/(.*)$ http://v2.name.com/$1/$2/$3 [NC,R=301,L] # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule … Read more