...

View Full Version : Resolved Website displays folder instead of the actual page



[vengeance]
09-11-2009, 05:30 PM
First off - SORRY, if this isn't an appropiate section for my issue. There's a bit PHP in it, but it's mainly based on my .htaccess along with URL rewriting, I guess. But at the same time, I really need to get this solved as soon as possible.

So I have rewritten my URLs in my htaccess file. When I go to www.mysite.com/forum I want it to load the contents from index.php?page=forum

Although! Instead it loads the folder called forum/ in my root folder. So I would actually have to change the ?page value or change the folder name.

Isn't there a work around for this in my .htaccess file perhaps?
The rewriting in my .htaccess looks like this:



RewriteRule ^([a-zA-Z0-9]+)$ index.php?page=$1

angst
09-11-2009, 05:50 PM
are you sure that rewriting is enabled?

[vengeance]
09-11-2009, 05:52 PM
are you sure that rewriting is enabled?

Yes, yes it is.



RewriteEngine On
// Rewrite stuff here including the code posted on the first post.

angst
09-11-2009, 05:53 PM
right, but just because you put "RewriteEngine On" doesn't mean that it's installed and working.

[vengeance]
09-11-2009, 05:54 PM
right, but just because you put "RewriteEngine On" doesn't mean that it's installed and working.

Well, it works for any other page - but not for the forum/ somehow, because I have a folder called the same.

angst
09-11-2009, 05:56 PM
ah ok, I'm not sure if theres a work around for that, it might be simpler to just change the folder or link name.

Coyote6
09-11-2009, 08:14 PM
This is more of an .htaccess issue than a php one but I will try to help. .htaccess is a great tool but can be very frustrating. My guess is that if there is a folder named that then it is most likely the cause because it normally only goes to the mod_rewrite if the requested file or folder is not found. So you may try either changing the folder name or the script name. Just a thought.

...Like angst just suggested...

[vengeance]
09-11-2009, 09:36 PM
Well yeah, I got frustrated about it and simply changed the folder name. It works now. :thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum