Go Back   cPanel Forums > cPanel® and WHM® (for Linux® and FreeBSD® Servers) > cPanel and WHM Discussions

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-22-2008, 11:37 AM
Registered User
 
Join Date: Jan 2006
Posts: 23
cmariomej is on a distinguished road
.htaccess Issue causing FTP to fail even from cPanel file editor

Hi all, I need some advice from someone who knows the proper syntax of an .htaccess file.

My problem I guess started after installing a WordPress module that rewrites URLs to make them more friendly; when I first installed this module it worked ok. The blog is installed on a subfolder in my account. (mydomain.com/blog)

Later I wanted to add another link in the main menu to the main website (mydomain.com) so I figured out that creating a blank page and doing some redirection will work. I created the page and did some redirection using cPanel. When I went to check the website it was down, the whole thing even those static pages out of the blog were down. So I checked the .htaccess file and found out that by creating the redirection from cPanel did some damage to my custom .htaccess (I do not have a backup of the old one that was working before). I was able to correct the error and make the website available again but there is still one problem, FTP is failing and Dreaweaver says is because of file permissions. Not even editing using the file browser feature from cPanel works.

The more I try the more I realize I need to ask an expert. So here is my last resource. Below I'm pasting my current .htaccess file in the hope somebody can help:

PHP Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase 
/blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
. /blog/index.php [L]
</
IfModule>

Options +Indexes 
IndexIgnore 
*


php_value memory_limit  60M     
php_value upload_max_filesize  50M
php_value post_max_size  60M 
RewriteCond 
%{HTTP_HOST} ^mydomain.com$ [OR] 
The top part was added to make the blog work with the redirection plugin, the one at the bottom is the custom one which was changed. I will appreciate any input on this.

Thank you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 11-22-2008, 12:06 PM
Infopro's Avatar
Forum Moderator
 
Join Date: May 2003
Location: Pennsylvania
Posts: 3,901
Infopro is on a distinguished road
Lightbulb

Quote:
Originally Posted by cmariomej View Post
Hi all, I need some advice from someone who knows the proper syntax of an .htaccess file.

My problem I guess started after installing a WordPress module that rewrites URLs to make them more friendly; when I first installed this module it worked ok. The blog is installed on a subfolder in my account. (mydomain.com/blog)

Later I wanted to add another link in the main menu to the main website (mydomain.com) so I figured out that creating a blank page and doing some redirection will work.
Confused here, you want to add a link on your site to another page, so you're going to add a redirect to get to it? You might want to go here for wordpress support.
http://wordpress.org/support/forum/3
Or search those forums for htaccess.
http://wordpress.org/tags/htaccess

Quote:
Originally Posted by cmariomej View Post
I created the page and did some redirection using cPanel. When I went to check the website it was down, the whole thing even those static pages out of the blog were down. So I checked the .htaccess file and found out that by creating the redirection from cPanel did some damage to my custom .htaccess (I do not have a backup of the old one that was working before).
That module you installed may have one in the original zip, or you might find a default on one of the links above.


Quote:
Originally Posted by cmariomej View Post
I was able to correct the error and make the website available again but there is still one problem, FTP is failing and Dreaweaver says is because of file permissions. Not even editing using the file browser feature from cPanel works.

The more I try the more I realize I need to ask an expert. So here is my last resource. Below I'm pasting my current .htaccess file in the hope somebody can help:

PHP Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase 
/blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
. /blog/index.php [L]
</
IfModule>

Options +Indexes 
IndexIgnore 
*


php_value memory_limit  60M     
php_value upload_max_filesize  50M
php_value post_max_size  60M 
RewriteCond 
%{HTTP_HOST} ^mydomain.com$ [OR] 
The top part was added to make the blog work with the redirection plugin, the one at the bottom is the custom one which was changed. I will appreciate any input on this.

Thank you
You might want to broaden your horizons past this forum to google for reading on how to use htaccess.
http://www.google.com/search?hl=en&q...o+use+htaccess


Or ask your host. They are the ones who support you. These forums support them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 11-22-2008, 12:51 PM
Registered User
 
Join Date: Jan 2006
Posts: 23
cmariomej is on a distinguished road
HI, thank you for your response Infopro

HI, thank you for your response Infopro. I already solved the issue to add the link to the main page on WordPress so I no longer need this. I was just telling the whole story so that people can understand what I did and how I did it as I believe is important.
What I'm asking for is to solve this FTP issue due to this .htaccess file misconfiguration. In the other hand I cannot ask my host... I'm the host
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 11-22-2008, 04:53 PM
Infopro's Avatar
Forum Moderator
 
Join Date: May 2003
Location: Pennsylvania
Posts: 3,901
Infopro is on a distinguished road
Lightbulb

Understood.

Not sure what the deal is with dreamweaver though sorry to say. Of course if you renamed that htaccess so it was disabled, and try dreamweaver again and it works fine, then as you say, something is wrong in that file.

A good FTP client is always best to use for FTP access. Create the site, saved to dick at home, then upload it via an FTP client like CuteFTP for example. (my personal fav)


Good luck!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 11-23-2008, 10:45 PM
Registered User
 
Join Date: Jan 2006
Posts: 23
cmariomej is on a distinguished road
Hmmmm, I guess my best bet is to ask cPanel support itself because I already tested it with Filezilla and it didn't work so is not matter of the client, even WinSCP fails... anyways, may thanx for replying and for the good wishes.

Thanx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
ftp , htaccess , redirect , rewrite , url

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 10:04 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc