Forum Moderators: phranque

Message Too Old, No Replies

Two Domains, One Website, 3/4 Redirections

New Guy does battle with .htaccess, loses, calls for help

         

3noneTwo

11:44 am on Jan 21, 2010 (gmt 0)

10+ Year Member



Hi folks, I've got a problem here which doesn't seem to be all that common. Lemme set this scenario up for you:

I have two domains, example.com and xmp.le - The mainsite of example.com lies in /index (with a splash page in the root directory), whereas xmp.le's root directory IS /index. xmp.le exists solely for personal shortlinks.

Wordpress is installed in /index, and I'm relying on the Pretty Links [blairwilliams.com] plug-in for my shortlinks.

Rewrites work perfectly on Wordpress: example.com/index/ will direct to the homepage, example.com/index/33 will go to a post with page-ID "33", example.com/index/about will go to my About page (as set through Wordpress itself), and example.com/index/h6y is a custom shortcode that I've set through Pretty Links - redirecting with no problems.

On xmp.le: xmp.le is the homepage, xmp.le/33 is the page-ID post, and xmp.le/about is the About page - These all work just fine. But xmp.le/h6y is treated as if I'm looking for an existing page, and instead leads me to my own slap-in-the-face Wordpress 404. To which I groan and slap myself in the face.

My .htaccess resides in /index, consisting simply of code to allow rewrites in Wordpress for both domains, as follows:

# BEGIN WordPress example.com
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /index/
RewriteCond %{HTTP_HOST} example.com$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index/index.php [L]
</IfModule>
# END WordPress example.com
# BEGIN WordPress xmp.le
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} xmp.le$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress xmp.le

I've dug around through Pretty Links, and there's no secret .htaccess or .htconf in the back. And I've tried [a different short-URL plug-in,] and shortlinks work perfectly on BOTH domains though this plug-in. It just doesn't offer the same functionality as Pretty Links (Le Petite only shortens page links on Wordpress, external links are a non-event).

I know so very little about .htaccess - Everything I've learned, I've learned in the past week. Everything being "Your website doesn't like you. Man up." So I'm throwing in the towel and asking WebmasterWorld!

Any ideas?

[edited by: jdMorgan at 9:04 pm (utc) on Jan. 21, 2010]
[edit reason] Snipped URL [/edit]

jdMorgan

9:03 pm on Jan 21, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If the problem is cured by using a different short-URL plugin, then the problem is in your WP configuration or in WP itself. Once these requests are made to your server, it's too late for mod_rewrite to 'fix' them. So, you'll need to look into your WP config, I'm afraid.

Jim