tags:

views:

41

answers:

1

Hi,

I read a ton of pages and tried lots of solutions but none have worked yet!

My problem is that:

test.asifa.net/asifa-wp

Redirects to:

test.asifa.net/asifa-wp/

Which redirects to the first page.

What's a little bizarre is asifa-wp produces:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="http://test.asifa.net/asifa-wp/"&gt;here&lt;/a&gt;.&lt;/p&gt;
</body></html>

Whereas asifa-wp/ produces an empty page but the following headers (curl -v output):

* About to connect() to test.asifa.net port 80 (#0)
*   Trying 69.163.203.138... connected
* Connected to test.asifa.net (69.163.203.138) port 80 (#0)
> GET /asifa-wp/ HTTP/1.1
> User-Agent: curl/7.18.2 (i386-redhat-linux-gnu) libcurl/7.18.2 NSS/3.12.0.3 zlib/1.2.3 libidn/0.6.14 libssh2/0.18
> Host: test.asifa.net
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Date: Sun, 13 Jun 2010 05:40:12 GMT
< Server: Apache
< X-Powered-By: PHP/5.2.13
< X-Pingback: http://test.asifa.net/asifa-wp/xmlrpc.php
< Set-Cookie: _icl_current_language=en; expires=Mon, 14-Jun-2010 05:40:12 GMT; path=/asifa-wp/
< Location: http://test.asifa.net/asifa-wp
< Vary: Accept-Encoding
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8

.htaccess looks like:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /asifa-wp/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /asifa-wp/index.php [L]

</IfModule>

# END WordPress

Any help at all would be tremendously appreciated!!!

A: 
<?php
/*
Plugin Name: Disable Canonical URLs
Description: Disable Canonical URLs
Version: .1
Author: Aaron
Author URI: http://aahacreative.com/
*/

remove_filter('template_redirect', 'redirect_canonical');
?> 

Try saving this to a .php file and activating it on your wordpress install.

Aaron Harun
Aaron,Thank you so much for your reply!!!I had already tried putting that line into functions.php... I've tried it as a plugin just now, as you suggested, but the problem unfortunately remains.Maybe one clue is that one 301 seems to happen before PHP even gets started.. check out the headers with curl -v...
Brett W. Thompson
The url with the slash though starts PHP. Make sure there are no rules set in the apache config itself for your host. Worst case scenario, submit a support ticket for the logs or for them to take a look.
Aaron Harun