How to solve htaccess issue

Kingmati

Registered Member
Joined
Oct 30, 2019
Messages
97
Reaction score
8
Am using buzzy viral php news script for my main site, so i create a folder in my cpanel called forum and upload ips community php script on it for forum, but when i type my domain/forum it will be showing me error. When i remove a line of code in my htaccess. It will open but the main site that is using buzzy script will not open.

Here is what a talking about. buzzicati.com.ng is working but buzzicati.com.ng/forum is not working
 
the easiest fix would be to have the forum on a subdomain since that way you can have separate htaccess files that don't conflict since from a quick glance it looks like the scripts just don't play well with each other.
 
Paste your htaccess here.. Error seems to be redirect related. Probably easy to solve.
 
The problem is in your forum htaccess file. You must have another htaccess file generated by IPS. Go to the settings panel and find friendly URL or rewrite URLs. That should be checked. Then IPS will auto generate new htaccess file. Check the privileges if IPS can write in the forum folder.
 
Paste your htaccess here.. Error seems to be redirect related. Probably easy to solve.
here is the htaccess code

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
 
here is the htaccess code

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Well I am not sure what that RewriteRule ^(.*)$ public/$1 [L] does here. Do you have a public folder where you are redirecting the requests?
Anyways, my best guess is that the sub folder can't be accessed because of this particular rule only. It does not check whether the requested folder/file exists before redirecting to public/$1.

Try this may be:

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Now, chances are that this may not work. In case it doesn't, you could PM me a snapshot of your folder structure. I will try to help you out. :)
 
Last edited by a moderator:
Well I am not sure what that RewriteRule ^(.*)$ public/$1 [L] does here. Do you have a public folder where you are redirecting the requests?
Anyways, my best guess is that the sub folder can't be accessed because of this particular rule only. It does not check whether the requested url/file exists before redirecting to is may be:

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Now, chances are that this may not work. In case it doesn't, you could PM me a snapshot of your folder structure. I will try to help you out. :)
i tried it but is not working.
here is the screenshoot of the foldersView attachment 126313 View attachment 126313 View attachment 126313 View attachment 126313
Well I am not sure what that RewriteRule ^(.*)$ public/$1 [L] does here. Do you have a public folder where you are redirecting the requests?
Anyways, my best guess is that the sub folder can't be accessed because of this particular rule only. It does not check whether the requested url/file exists before redirecting to public/$1.

Try this may be:

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteCond ${REQUEST_FILENAME} !-f
RewriteCond ${REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
Now, chances are that this may not work. In case it doesn't, you could PM me a snapshot of your folder structure. I will try to help you out. :)
i have tried it but is not working.
here is the folder screenshot
i think the htaccess is only redirecting to this public/$1 folder
folder.JPG
 
NO, I told you how IPS can generate that file automatically.
okay, but i cant access the forum unless i remove this code from the htaccess file. RewriteRule ^(.*)$ public/$1 [L]
 
okay, but i cant access the forum unless i remove this code from the htaccess file. RewriteRule ^(.*)$ public/$1 [L]

You can't access the forum but you can access the admin panel because admin panels don't use rewrite urls. Just open https://yourdomain.com/forum/admin/, you should be able to access the admin panel
 
i tried it but is not working.
here is the screenshoot of the foldersView attachment 126313 View attachment 126313 View attachment 126313 View attachment 126313

i have tried it but is not working.
here is the folder screenshot
i think the htaccess is only redirecting to this public/$1 folder
View attachment 126314
Do you get a server error when you try my code?

Try this instead (I just tried the htaccess rules in my local wamp server, and it worked as intended).

Code:
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

If it still does not work, probably there's a problem with your rewrite module. Not configured properly may be..
 
Do you get a server error when you try my code?

Try this instead (I just tried the htaccess rules in my local wamp server, and it worked as intended).

Code:
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>

If it still does not work, probably there's a problem with your rewrite module. Not configured properly may be..
check it out you will see it is showing all my site folder, but if i click on public and forum they will open.
 
Back
Top