homepage Welcome to WebmasterWorld Guest from 54.204.231.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Mod rewriteMoved forum script from subdomain to subfolder and broke it
scraptoft




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

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.

-Public_html
-.htaccess
+forum
. -htaccess

Anyone have any ideas?

 

jdMorgan




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

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... :(

Jim

londrum




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

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

scraptoft




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

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.

jdMorgan




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

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.

Jim

scraptoft




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved