.htaccess problem...

roelpaulo93

New Member
Messages
17
Reaction score
0
Points
1
Hey guys, I just built my own CMS, It is written in PHP, I want to create permalinks by using .htaccess files. I've already made my .htaccess in my home server and it is going ok there... but when i put my .htaccess file in the public_html folder it says "Internal Server Error". my code in the .htaccess file goes like this:

RewriteEngine On
RewriteBase /
RewriteRule ^article/(.*)/(.*) index.php?article=$1&alias=$2 [L]
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule . /index.php [L]

I do not know what to do because on my home server it is ok but when i put it here it gives me a 500 error... any help? this is my website: http://roelpaulo.tk. you will see the 500 here...
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Does index.php have permissions set to 0644?
 

roelpaulo93

New Member
Messages
17
Reaction score
0
Points
1
No, all my files are set to 664, but i set it all to 644, now it says when you check this link http://roelpaulo.tk, "Forbidden

You don't have permission to access / on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.". Same as before... is there something wrong with my RewriteRule in my .htaccess file? any help guys...? All i wanted was some permalinks to work on my site... please help...
 

patrick_ang63631

New Member
Messages
1
Reaction score
0
Points
0
Is this problem fixed? I don't see your problem when I visit your site.

If you still have your problem, I may have a solution for you based on my experience.
The first time I accessed my File Manager, there was an option to show hidden files (dot files). Your public_html directory already has it's .htaccess file which is blank. The reason why you may have the internal server error is because they don't allow overwriting the file.

What I did for my site is I just copied my .htaccess code to the one on the File Manager and it works perfectly.

Try it and tell me if it went well.. :smile:
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Your front page loads fine for me.
 

roelpaulo93

New Member
Messages
17
Reaction score
0
Points
1
Thanks for the help guys but it's ok now. I deleted my site, put in wordpress, enabled permalinks there, permalinks working, remove wordpress, put back my site again, put back my .htaccess file again and I do not know what happened but my .htaccess file is working now... :smile:
 
Top