You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After a fresh install and not touching the .htaccess file, it throws out so many apache errors. After editing it a bit for rewrite, it is still broken. I found THIS ANSWER on here from 2018, and it is still a solid solution. For anyone else having issues, the below code from that above link helped me out. Just empty the .htaccess file and put the following code in the same file.
<IfModule mod_rewrite.c>
RewriteEngine On
## Uncomment the below "#RewriteBase /" (remove "#") if pH7CMS is installed in a folder, and add the folder name after the slash "/"
## Example: If pH7CMS is installed in "/public_html/ph7cms/", then it should be "RewriteBase /ph7cms/", however it may depends of your Apache configuration.
## If you need, please ask your hosting company or check the Apache doc: http://httpd.apache.org/docs/current/mod/mod_rewrite.html
RewriteBase /
<IfModule mod_env.c>
# Tell PHP that the mod_rewrite module is ENABLED.
SetEnv HTTP_MOD_REWRITE On
</IfModule>
### For pH7CMS's URL router (DO NOT REMOVE THESE FOLLOWING CODE) ###
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
#RewriteRule ^(.*)$ init.ph7?$1 [L,QSA]
</IfModule>
<IfModule mod_php5.c>
php_flag allow_url_include Off
php_flag expose_php Off
</IfModule>
### Security and Spam ###
ErrorDocument 400 /error/http/index?code=400
ErrorDocument 401 /error/http/index?code=401
ErrorDocument 402 /error/http/index?code=402
ErrorDocument 403 /error/http/index?code=403
ErrorDocument 404 /error
ErrorDocument 405 /error/http/index?code=405
ErrorDocument 500 /error/http/index?code=500
ErrorDocument 501 /error/http/index?code=501
ErrorDocument 502 /error/http/index?code=502
ErrorDocument 504 /error/http/index?code=504
ErrorDocument 505 /error/http/index?code=505
# For the videos extensions
#AddType video/ogg .ogg
AddType video/webm .webm
AddType video/mp4 .mp4
AddType application/rss+xml .xml
# Personal pH7CMS extension file
#AddType application/x-httpd-php .ph7
#DirectoryIndex init.ph7
Describe the bug
After a fresh install and not touching the .htaccess file, it throws out so many apache errors. After editing it a bit for rewrite, it is still broken. I found THIS ANSWER on here from 2018, and it is still a solid solution. For anyone else having issues, the below code from that above link helped me out. Just empty the .htaccess file and put the following code in the same file.
To Reproduce
Steps to reproduce the behavior:
Additional Info
Expected Behavior
I expected the default .htaccess file to work and the site to load first try.
Screenshots / Screencasts
Before the editing of the .htaccess file:
After inputting the new .htaccess file code (Blacked out website name for security and cuz it isn't released yet):
The text was updated successfully, but these errors were encountered: