Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Mod rewriteMoved forum script from subdomain to subfolder and broke it



8:06 pm on Sep 16, 2009 (gmt 0)

5+ Year Member

Hi WW.

I've just moved a forum type script from a subdomain to a subdirectory. The pages are now timing out and I have no idea why.

Both the main website and the forum script use mod_rewrite for seo friendly URI's, each having their own .htaccess file.

I've tried deleting the .htaccess used by the main website (as it's in the root folder) but had no luck.

File structure.

. -htaccess

Anyone have any ideas?


8:16 pm on Sep 16, 2009 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Did you "reinstall" the forum script in the new location, or did you just move the files?

If you can't 'undo' what you've done, and if you're not conversant with mod_rewrite coding, I'd suggest you hire someone familiar with your forum script to help you move it. Otherwise, consider putting it back where it was. We can handle specific questions about .htaccess file and mod_rewrite coding here, but we're really not set up to be a 'help desk' for your forum script... :(



8:23 pm on Sep 16, 2009 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member

try backing up the database and having a look at it in a text editor. see if there are any URLs hardcoded into it, pointing to directories outside of the forum directory, or something like that.
maybe these URLs are now pointing to the wrong place.

then just import it back to the database again


9:41 am on Sep 17, 2009 (gmt 0)

5+ Year Member

londrum I thought you were on to a winner, but unfortunately after scanning through the whole db it wasn't the case.

Unfortunately this is a custom made script and I am no longer in contact with the programmer.

I was wondering if there was a possibility of the two .htaccess files possibly conflicting?

Upon further investigation the script works if a forward slash (/) is added to the end of the url.

Although none of the links in the source code link to a url with a forward slash and didn't use them whilst on the subdomain.

I guess I could go through the whole code and add a / to all of the links?

Cheers for the help anyway guys.


1:11 pm on Sep 17, 2009 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I'd advise looking at the code in the .htaccess files, and finding out why a trailing slash appears to be required. If you change your links, you thereby change your 'real' URLs. If you change your URLs, then you may expect those new URLs' rankings to suffer... and you'd likely want to add code to redirect the old URLs to the new in order to avoid losing traffic.

Fix the problem at its source instead of trying to find a 'quick fix.' Quick fixes tend to have unexpected and unpleasant side effects, especially as regards search results.

Nothing but a top-down analysis of 'how your site works' will do in this case. Start with a link on a page, and work through the .htaccess processing that handles the linked URL when it is requested by the client from your server, through its translation to a server filepath, and any handling of that URL within whatever script that URL gets 'delivered to' as a result of the .htaccess processing.



1:16 pm on Sep 17, 2009 (gmt 0)

5+ Year Member

Hi Jim,

Fixed the issue now. I had to strip a number of forward slashes from the .htaccess file.

I can't quite get my head around the difference between the sub directory and the sub folder to cause this problem.

Anyhow it's fixed now, thanks for the support.


Featured Threads

Hot Threads This Week

Hot Threads This Month