Webmastersite.net
Register Log In

using subfolders AND URL rewriting?

Comments on using subfolders AND URL rewriting?

Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Apr 17, 2009 - 2:20 PM:

Maybe this is a stupid question, but I've never really thought about this before-
I am using URL rewriting, and yesterday I set up a WordPress copy in a subfolder of my directory domain. Now when I try to access the blog, I get a WSN Links error message telling me something like "that part of the page doesn't exist".

Is it at all possible to run something separate in a subfolder? Or what would you suggest how I could integrate WordPress into WSN Links? To I have to disable URL rewriting?
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 17, 2009 - 10:57 PM:

At Admin Panel -> Settings -> SEO -> "Other .htaccess Content", insert
RewriteRule ^wordpress/?$ wordpress/index.php
RewriteRule ^wordpress/([-_/\+A-Za-z0-9]+)/?$ wordpress/$1/index.php

Ought to work.
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Apr 17, 2009 - 11:26 PM:

I'll try that right away, thanks Paul.

ETA: yay, it seems to work!!! thanks a lot grin
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Oct 26, 2009 - 11:55 AM:

what would I do to make it work the other way around - Wordpress in /root and WSN in a subfolder? I was using rewrite in Wordpress for a while without a problem, but when I just switched WSN to rewrite URLs as well I can't access the directory anymore. I just get a Wordpress 404 error. I tried changing that code you posted above and added it to htaccess of Wordpress, but that didn't do anything, and I can't even seem to find the spot in mySQL where I can turn this off for now to make the directory accessible again. Deleting .htaccess in the WSN folder did the trick and I can access the page again, but what would I have to do to correctly use the rewrite?

Help, please? rolling eyes
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 28, 2009 - 1:23 PM:

Handling of subdirectories as in the original post is automatic in 5.1.

Doing the reverse, to prevent wordpress rewrite from hijacking WSN, is an issue you need to take up with wordpress as it's their .htaccess generation that'd have to be modified in a way that's appropriate to how they do their rewriting.

Deleting .htaccess in the WSN folder did the trick and I can access the page again, but what would I have to do to correctly use the rewrite?

This doesn't make sense to me. I don't see how the WSN .htaccess can cause the behavior of a directory above it to change.
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Oct 28, 2009 - 1:42 PM:

Deleting .htaccess in the WSN folder did the trick and I can access the page again, but what would I have to do to correctly use the rewrite?

This doesn't make sense to me. I don't see how the WSN .htaccess can cause the behavior of a directory above it to change.


sorry, I was referring to not being able to access WSN, and when I deleted .htaccess in the WSN folder it started working again.



Doing the reverse, to prevent wordpress rewrite from hijacking WSN, is an issue you need to take up with wordpress as it's their .htaccess generation that'd have to be modified in a way that's appropriate to how they do their rewriting.


Okay I'll try that.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 29, 2009 - 6:40 PM:

I was referring to not being able to access WSN, and when I deleted .htaccess in the WSN folder it started working again.

That's what I don't understand. You should have to delete wordpress' htaccess to view wsn.

I just did a quick setup of WSN Links in a subdirectory of WordPress. It's working fine, with rewriting on, so I don't see what you're talking about: http://paul.quietplease.org/wsnlinks/
Jenny
Forum Regular

Usergroup: Customer
Joined: May 11, 2003

Total Topics: 64
Total Comments: 199
Jenny
Posted Oct 30, 2009 - 4:19 AM:

grin funny thing is that at that point I was just following your instrucions from the Manual/Troubleshooting part.
Then I contacted my webhost support, since they're specifically a Wordpress host and offer support for the script as well. I figured that might be faster than going through the WP forums.
Anyway, they started meddling through the scripts and told me that Option FollowSymlinks was not allowed and that was somehow the first line of the WSN htaccess file. So after deleting the file I was able to access the link directory again.
But now that I knew what the problem was I turn rewriting in WSN on again but just deleted that first line in .htaccess. I was then able to access the main page of WSN Links again, but nothing beyond, and it took me a long while and a lot of nerves discussing this with the customer service (which at some point gave up and told me I'd have to ask you!) but then I realized that after they fiddled with both .htaccess files all of a sudden the Wordpress rewrite rules were in the WSN Links .htaccess as well, so once I deleted that everything started to work just fine. But by now I read through so many guides and forums, I feel like a pro when it comes to mod_rewrite wink
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Oct 31, 2009 - 12:12 AM:

WSN attempts the file with followsymlinks and without. If it was in there when it shouldn't be, that'd presumably be because it failed both ways. Otherwise, I'd need access to the site to see how a scenario can arise where it picks the wrong one.

The .htaccess file is not for manual editing, and will be re-created regularly.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.