Forum Moderators: phranque

Message Too Old, No Replies

Rewrite Gone Wild

htaccess won't change even though deleted

         

rpophessagr

12:16 pm on Aug 2, 2010 (gmt 0)

10+ Year Member



Hi

I'm running wordpress 3.0.1

I added a link to my htaccess trying to mask a domain. It didn't work so I deleted it. but it's still doing what it wasn't supposed to do. Is there a cache or something with the htaccess I need to clean out?

The file now only contains the stuff wordpress put in, but it's redirected to another page...

Any ideas what I can do?

jdMorgan

2:03 pm on Aug 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, delete your browser cache and test again. Only in very rare cases, where hosting companies don't let you directly add and delete files, do you ever run into this 'impossibility.'

Some hosts only let you upload files to a 'virtual' filespace, which they then copy --say only once an hour-- to the real server filespace. It's not a very common set-up, but it does exist. I tend to run away as fast as possible from this kind of set up.

Most likely just your browser cache here, showing you stale server responses and page content.

Jim

rpophessagr

2:43 pm on Aug 2, 2010 (gmt 0)

10+ Year Member



Thanks for your reply.

I DID clear the cache.

I added the line
RewriteRule ^jackreichert\.com/network$ jackreichert.net [L]

so in complete code was
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^jackreichert\.com/network$ jackreichert.net [L]
</IfModule>

# END WordPress

I thought that if it didn't work I could just delete the line and try something else.
But now www.jackreichert.com jumps to the page www.jackreichert.com/network/

now all that's there is

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

g1smd

10:38 pm on Aug 2, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Since RewriteRule cannot test the domain name, that line of code cannot do what you say.

That line accepts a URL request for
www.example.com/jackreichert.com/network
and tries to fetch the file located at the server internal filepath
/var/www/yoursite/jackreichert.net
inside the server.

Or it would, if it wasn't for the previous line rewriting all requests to be processed by the Wordpress script.

rpophessagr

5:45 am on Aug 3, 2010 (gmt 0)

10+ Year Member



Thanks for the explanation. any ideas how to reset it so it acts normal again?

rpophessagr

9:31 am on Aug 3, 2010 (gmt 0)

10+ Year Member



I found the solution. I was running a plugin "Redirection" which was messing things up.

Thanks for all the help