solved Can't access to any directory where is located JR5

alt=
@andrusito
10 years ago
302 posts
I've JR5 installed on the root folder of my server. The problem is that I can't access the other folders located on the same level.

This is where JR is installed: http://devocionmusical.com
This is folder which contains another project: /cdvirtual

When I type http://devocionmusical.com/cdvirtual I get the "Not founded" JR5 page.

That didn't happen on JR4. Do u know why is that?

Thanks.
updated by @andrusito: 05/21/14 01:30:53PM
brian
@brian
10 years ago
10,148 posts
If cdvirtual is an actual directory, JR5 won't mess with it. There are rules specifically in the JR5 .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ modules/jrCore/router.php?_uri=$1 [NC,L]

This says "if the requested URI is NOT a directory, NOT a file and NOT a symlink, pass it into then JR5 router.

So I'm not sure why you would see that unless there is a .htaccess file in the cdvirtual directory that is redirecting back to the root.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@andrusito
10 years ago
302 posts
Yes, cdvirtual is a folder which also contains files. One of them is called "index.html"

But if I go to http://devocionmusical.com/cdvirtual/index.html you will see the error page again.

I have this at the very top of my .htacess file:

# All requests through the router

RewriteEngine On
RewriteRule ^(.*)favicon\.ico$ modules/jrCore/img/favicon.ico [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ modules/jrCore/router.php?_uri=$1 [NC,L]
brian
@brian
10 years ago
10,148 posts
Something is wrong with your mod_rewrite setup then - you can see it working properly here:

https://www.jamroom.net/test/
https://www.jamroom.net/test/index.html

You'll want to contact your hosting provider and see if they can help you out.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
10 years ago
7,714 posts
Check your filenames are correct.

http://devocionmusical.com/cdvirtual/index.htm

shows a page.
alt=
@andrusito
10 years ago
302 posts
michael:
Check your filenames are correct.

http://devocionmusical.com/cdvirtual/index.htm

shows a page.

You were right @michael. The file name was wrong.. anyway I still can not access my directory /cdvirtual.

Do u know what could be wrong?

Thanks
brian
@brian
10 years ago
10,148 posts
Did you contact your hosting provider? What did they say?


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
@andrusito
10 years ago
302 posts
Hey I solved the problem.. very strange thing :l

1. I uploaded an index.php file and it worked! So I had two index files (htm and php)

2. I rename the index.htm to index.html and it worked!

I chose to keep the second solution but I did not know that a file with extension ".html" was mandatory.

Thanks @michael for that clue and @brian for your support.
brian
@brian
10 years ago
10,148 posts
Glad to hear it - thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags