Is there a way to exclude a directory from being parsed in c5?

Permalink
Hi Everyone,

I want to put a mediawiki wiki in a folder off the root named 'wiki'. However, try as I might, I can't convince c5 not to try and parse it as a page.

Does anyone know how to do this?

Thanks

 
Shotster replied on at Permalink Reply
Shotster
I'm not sure I understand, but if you're referring to the site map in the dashboard, those aren't directories. The folder icons are misleading (and have been replaced with regular page icons in an upcoming release). The site map depicts the page hierarchy; you don't directly manipulate directories in C5.

If you need to install something else on your hosting account, you have to do that outside of C5. You should first, however, make sure that whatever functionality you're after can't be provided by C5 or an add-on.

-Steve
ZeroGodForce replied on at Permalink Reply
Hi Steve,
Thanks for your reply, but I think you've got the wrong end of the stick. I don't mean the sitemap or anything 'inside' c5 itself.

What I'm talking about is an actual physical folder in the webroot named 'wiki' which contains an installation of mediawiki, and sits on the same level with the folders and files that make up concrete5.

Sorry I should have said 'webroot' instead of just 'root'.

Whenever I try to navigate tohttp://www.site.com/wiki - c5 tries interpret 'wiki' as though it were a page in the system, and when it can't find anything called wiki, gives me the 404. I need it to NOT do that.

As far as using an add-on. I don't think that there is a wiki add-on for c5, and even if there was, I doubt it'd be free.

Cheers
Shotster replied on at Permalink Reply
Shotster
> Whenever I try to navigate to
>http://www.site.com/wiki - c5
> tries interpret 'wiki' as though it
> were a page in the system

Ok, I see now. It might have something to do with pretty URLs. Which version of C5 are you using? I'm using the beta version of 5.4.1. I did a quick test and don't see that behavior - even with pretty URLs enabled.

Here's a post that seems related though...

http://www.concrete5.org/community/forums/installation/c5-in-subfol...

-Steve
andrew replied on at Permalink Best Answer Reply
andrew
I assume you have pretty URLs enabled for your site. If that's the case, add an .htaccess file in the mediawiki directory (or add this line to it if it already exists):

RewriteEngine off


That'll turn off mod_rewrite for all directories below, and let mediawiki's directory get parsed.
ZeroGodForce replied on at Permalink Reply
Thanks for your help guys. Andrew, you were right on the money, that worked nicely.

Cheers
volcaremos replied on at Permalink Reply
It would seem that if the directory in question also contains an .htpasswd file the method described does not work. Does anyone have any idea how to stop such directories form being parsed by Concrete5 and cause a 404 error?

Many thanks

C.
ZeroGodForce replied on at Permalink Reply
I had protected my wiki directory as well, but the .htpassword file was well outside the directory, elsewhere in my home folder in fact. Try storing the .htpassword file elsewhere, and see if the original solution works for you.
volcaremos replied on at Permalink Reply
Hi ZeroGodForce

I appreciate your reply and suggestion. I have tried to move the .htpassw up one level so it does not reside with .htaccess files but this has not solved the problem. C5 still catches these directories and returns a Page not Found error.

V.
Agetis replied on at Permalink Reply
Agetis
Hey Volcaremos!

Did you solve this problem?
I have the same one and can not get it solve.

Thank you very much!
volcaremos replied on at Permalink Reply
Hi Agetis

I solved the problem by creating subdomains (rather than simple directories) and placing non-concrete content there. Then I added a redirect script in the .htaccess file.

cheers

V
creativeorange replied on at Permalink Reply
creativeorange
Came across your reply. I'm trying to do something similar however the changes aren't taking.

My MOD ReWrite looks like this
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /costumeshoppe/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
# -- concrete5 urls end --
# -- concrete5 urls start --
<IfModule mod_rewrite.c>
RewriteEngine Off
RewriteBase /costumeshoppe/mobile-dev/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


And this code is installed in the "mobile-dev" folder so that the pretty URLs don't effect this path.

I was playing around adding the "mobile-dev" option for the rewrite after the default option didn't work. But I'm at a loss. Any ideas?
jmcgarvey replied on at Permalink Reply
jmcgarvey
For anyone that is still having an issue, I was able to resolve the problem. I had a unique issue where my clients site (prior to adding C5) had a folder called UPDATES that their customers access to get software patches. They could not change this. So I had to allow updates to be ignored by the RewriteRule in HTACCESS

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/updates/
RewriteRule ^([^.]+)$ index.php/$1 [L]
</IfModule>


Take careful note of the addition of the extra RewriteCond and change in the RewriteRule - no longer using:

^(.*)$

This was the only way that I was able to get the C5 Page Not Found to not show up.

Bad news is that updating C5 is now a manual process. I can live with that.