Resell Rights Weekly Forum » Resell Rights Weekly Members Area
» Download Free PLR Products
September 08, 2010, 10:49:01 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Chat Map Photos Articles Login Register Welcome Downloads  
Pages: [1]   Go Down
  Print  
Author Topic: Technical Help Please!  (Read 582 times)
0 Members and 1 Guest are viewing this topic.
  Hello! My name is Mark Austin (forum admin), and I'd like to extend to you a warm welcome to our friendly online community! If you haven't had a chance to join our forum yet, why not register now so you can take full advantage of all this forum has to offer? And, of course, we'd love to get to know you better, so why not share some of your experiences with us? Oh, after you login, this annoying message will disappear forever! Click here to register now!  
valpubs
Sr Member
Offline Offline

Joined January 13, 2009
Location: Gloucester, UK
Forum Posts: 1,207
Age: 42


Lil 'ol Me

View Profile WWW Ignore This User
« on: May 23, 2009, 05:34:59 PM »

Hi folks

I have just uploaded Wordpress to my new domain name and I am in the process of altering my permalinks to make them a custom appearance called ' /%postname%/ ' . This makes the title of each post the URL of that post. However, wordpress now needs me to update my htaccess file with the following code:

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

What do I do with this code? What is htaccess? Help !!!  Angry Angry
Logged

Howard Roper
Sr. Member
Offline Offline

Joined May 02, 2009
Location: Lehigh Acres, FL
Forum Posts: 417
Age: 58


(¯`*•. Mr. Rebound .•*´¯)

HowardRoper View Profile WWW Ignore This User
« Reply #1 on: May 23, 2009, 09:09:47 PM »

valpubs, you're probably gonna hate me for this but the following info is about .htaccess

.htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.

Note: If you want to call your .htaccess file something else, you can change the name of the file using the AccessFileName directive. For example, if you would rather call the file .config then you can put the following in your server configuration file:

AccessFileName .config 

What you can put in these files is determined by the AllowOverride directive. This directive specifies, in categories, what directives will be honored if they are found in a .htaccess file. If a directive is permitted in a .htaccess file, the documentation for that directive will contain an Override section, specifying what value must be in AllowOverride in order for that directive to be permitted.

For example, if you look at the documentation for the AddDefaultCharset directive, you will find that it is permitted in .htaccess files. (See the Context line in the directive summary.) The Override line reads "FileInfo". Thus, you must have at least "AllowOverride FileInfo" in order for this directive to be honored in .htaccess files.

Example:

Context: server config, virtual host, directory, .htaccess
Override: FileInfo

If you are unsure whether a particular directive is permitted in a .htaccess file, look at the documentation for that directive, and check the Context line for ".htaccess."

When (not) to use .htaccess files
In general, you should never use .htaccess files unless you don't have access to the main server configuration file. There is, for example, a prevailing misconception that user authentication should always be done in .htaccess files. This is simply not the case. You can put user authentication configurations in the main server configuration, and this is, in fact, the preferred way to do things.

.htaccess files should be used in a case where the content providers need to make configuration changes to the server on a per-directory basis, but do not have root access on the server system. In the event that the server administrator is not willing to make frequent configuration changes, it might be desirable to permit individual users to make these changes in .htaccess files for themselves. This is particularly true, for example, in cases where ISPs are hosting multiple user sites on a single machine, and want their users to be able to alter their configuration.

However, in general, use of .htaccess files should be avoided when possible. Any configuration that you would consider putting in a .htaccess file, can just as effectively be made in a <Directory> section in your main server configuration file.

There are two main reasons to avoid the use of .htaccess files.

The first of these is performance. When AllowOverride is set to allow the use of .htaccess files, Apache will look in every directory for .htaccess files. Thus, permitting .htaccess files causes a performance hit, whether or not you actually even use them! Also, the .htaccess file is loaded every time a document is requested.

Further note that Apache must look for .htaccess files in all higher-level directories, in order to have a full complement of directives that it must apply. (See section on how directives are applied.) Thus, if a file is requested out of a directory /www/htdocs/example, Apache must look for the following files:

/.htaccess
/www/.htaccess
/www/htdocs/.htaccess
/www/htdocs/example/.htaccess 

And so, for each file access out of that directory, there are 4 additional file-system accesses, even if none of those files are present. (Note that this would only be the case if .htaccess files were enabled for /, which is not usually the case.)

The second consideration is one of security. You are permitting users to modify server configuration, which may result in changes over which you have no control. Carefully consider whether you want to give your users this privilege.

Note that it is completely equivalent to put a .htaccess file in a directory /www/htdocs/example containing a directive, and to put that same directive in a Directory section <Directory /www/htdocs/example> in your main server configuration:

.htaccess file in /www/htdocs/example:

AddType text/example .exm 

httpd.conf

<Directory /www/htdocs/example>
AddType text/example .exm
</Directory> 

However, putting this configuration in your server configuration file will result in less of a performance hit, as the configuration is loaded once when Apache starts, rather than every time a file is requested.

The use of .htaccess files can be disabled completely by setting the AllowOverride directive to "none"

AllowOverride None 

How directives are applied
The configuration directives found in a .htaccess file are applied to the directory in which the .htaccess file is found, and to all subdirectories thereof. However, it is important to also remember that there may have been .htaccess files in directories higher up. Directives are applied in the order that they are found. Therefore, a .htaccess file in a particular directory may override directives found in .htaccess files found higher up in the directory tree. And those, in turn, may have overridden directives found yet higher up, or in the main server configuration file itself.

Example:

In the directory /www/htdocs/example1 we have a .htaccess file containing the following:

Options +ExecCGI 

(Note: you must have "AllowOverride Options" in effect to permit the use of the "Options" directive in .htaccess files.)

In the directory /www/htdocs/example1/example2 we have a .htaccess file containing:

Options Includes 

Because of this second .htaccess file, in the directory /www/htdocs/example1/example2, CGI execution is not permitted, as only Options Includes is in effect, which completely overrides any earlier setting that may have been in place.

Authentication example
If you jumped directly to this part of the document to find out how to do authentication, it is important to note one thing. There is a common misconception that you are required to use .htaccess files in order to implement password authentication. This is not the case. Putting authentication directives in a <Directory> section, in your main server configuration file, is the preferred way to implement this, and .htaccess files should be used only if you don't have access to the main server configuration file. See above for a discussion of when you should and should not use .htaccess files.

Having said that, if you still think you need to use a .htaccess file, you may find that a configuration such as what follows may work for you.

You must have "AllowOverride AuthConfig" in effect for these directives to be honored.

.htaccess file contents:

AuthType Basic
AuthName "Password Required"
AuthUserFile /www/passwords/password.file
AuthGroupFile /www/passwords/group.file
Require Group admins 

Note that AllowOverride AuthConfig must be in effect for these directives to have any effect.

Please see the authentication tutorial for a more complete discussion of authentication and authorization.

Server side includes example
Another common use of .htaccess files is to enable Server Side Includes for a particular directory. This may be done with the following configuration directives, placed in a .htaccess file in the desired directory:

Options +Includes
AddType text/html shtml
AddHandler server-parsed shtml 

Note that AllowOverride Options and AllowOverride FileInfo must both be in effect for these directives to have any effect
Logged

Howard Roper
(¯`*•. "Mr. Rebound" .•*´¯)
Best Webhosting Service I've Found         Marketers Traffic Vault
Howard Roper
Sr. Member
Offline Offline

Joined May 02, 2009
Location: Lehigh Acres, FL
Forum Posts: 417
Age: 58


(¯`*•. Mr. Rebound .•*´¯)

HowardRoper View Profile WWW Ignore This User
« Reply #2 on: May 23, 2009, 09:11:58 PM »

Hi folks

I have just uploaded Wordpress to my new domain name and I am in the process of altering my permalinks to make them a custom appearance called ' /%postname%/ ' . This makes the title of each post the URL of that post. However, wordpress now needs me to update my htaccess file with the following code:

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

What do I do with this code? What is htaccess? Help !!!  Angry Angry

Now that I told you what .htaccess is I need to ask you this - are you utilizing the wordpress hosted site or are you using your own host?

This is important!
Logged

Howard Roper
(¯`*•. "Mr. Rebound" .•*´¯)
Best Webhosting Service I've Found         Marketers Traffic Vault
valpubs
Sr Member
Offline Offline

Joined January 13, 2009
Location: Gloucester, UK
Forum Posts: 1,207
Age: 42


Lil 'ol Me

View Profile WWW Ignore This User
« Reply #3 on: May 24, 2009, 04:32:48 PM »

Hi folks

I have just uploaded Wordpress to my new domain name and I am in the process of altering my permalinks to make them a custom appearance called ' /%postname%/ ' . This makes the title of each post the URL of that post. However, wordpress now needs me to update my htaccess file with the following code:

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

What do I do with this code? What is htaccess? Help !!!  Angry Angry

Now that I told you what .htaccess is I need to ask you this - are you utilizing the wordpress hosted site or are you using your own host?

This is important!

Wow! Let me just stop my head from spinning  Drunk

I'm using my own host (well, I'm using the free hosting that Mark gives you as part of the Gold membership package (the hosters are a company called Liquidweb I believe)). I downloaded Wordpress 2.7.1 using fantastico de luxe from cpanel11
Logged

multihb
Sr. Member
Offline Offline

Joined February 11, 2009
Location: Ylivieska, Finland
Forum Posts: 452

Keep doing what you are doing,don't give up!

multihb View Profile WWW Ignore This User
« Reply #4 on: May 25, 2009, 12:33:37 PM »

valpubs,

I think there is nothing else needed to do as add this codepart in your existing .htacces file located in your main public_html folder in you blog site. (if you have installed your blog to your mainfolder)

In some servers .htaccess files are hided so that you cannot see it when using normal FTP program, so I suggest for you to use your cpanel filemanager when you are doing your modifications.

So just download in reserve to your PC, existing .htacces file (for the case you do something wrong, you can easily upload that saved one again to your server)

Now do modification, add that codepart to that existing htaccess file, and upload to your server replacing old one.
then make the test. If it works that's it..and just fine  Grin

Depending which PHP version your server use and which are default adjustments there sometimes could be some possibilities to have difficulties, but all is possible resolve when having patience and asking questions.

I suppose Mark knows what PHP version is used in that host which is offered via RRW..and are the defaults as usual.

I hope this helps  Grin

Aatos
Logged

valpubs
Sr Member
Offline Offline

Joined January 13, 2009
Location: Gloucester, UK
Forum Posts: 1,207
Age: 42


Lil 'ol Me

View Profile WWW Ignore This User
« Reply #5 on: May 25, 2009, 02:11:51 PM »

Aatos

Many thanks.. yes I think it will help.

If it does not then I shall just keep asking for help until it is sorted out!

Logged

KarenMcG
Sr. Member
Offline Offline

Joined August 19, 2008
Location: Iowa
Forum Posts: 2,290
Age: N/A


KarenMcGreevey View Profile WWW Ignore This User
« Reply #6 on: May 26, 2009, 08:36:30 PM »

I knew it!

I knew Howard and Aatos would know exactly how to help you, Val, so I just let them instead of throwing in my two cents.  Grin

And as Aatos suggests, Mark ought to be able to provide great input, too.



Karen
Logged

Howard Roper
Sr. Member
Offline Offline

Joined May 02, 2009
Location: Lehigh Acres, FL
Forum Posts: 417
Age: 58


(¯`*•. Mr. Rebound .•*´¯)

HowardRoper View Profile WWW Ignore This User
« Reply #7 on: May 27, 2009, 01:05:02 AM »

I knew it!

I knew Howard and Aatos would know exactly how to help you, Val, so I just let them instead of throwing in my two cents.  Grin

And as Aatos suggests, Mark ought to be able to provide great input, too.



Karen

Thanks for the compliment Karen! Kudos to you...
Logged

Howard Roper
(¯`*•. "Mr. Rebound" .•*´¯)
Best Webhosting Service I've Found         Marketers Traffic Vault
Jonathan Phillips
Sr. Member
Offline Offline

Joined May 03, 2009
Forum Posts: 114
View Profile WWW Ignore This User
« Reply #8 on: May 29, 2009, 01:47:51 PM »

Since everyone else has covered htaccess and what it is and does, I'll see if I can address the error message.

I've hit this 'error' many times - usually when I forget to make this one small tweak to the htaccess file -  and it almost always has to do with Wordpress not being able to automatically write the mod_rewrite section to your .htaccess file (which is automatically installed in the root of your WP installation).  It's similar to what you'll see if you go into Appearance/Editor and look at the message below the edit window; "You need to make this file writable before..." 

CAUTION - GEEKSPEAK AHEAD!

You need to change the access level (sometimes called permissions) on .htaccess from whatever it currently is (probably 644) to 755 (or - God forbid - 777) so that it is writeable by Wordpress. 

Once you've done that, go back into permalinks and select custom (I usually do /%category%/%postname%/ since I have categories set up as keywords), and WP will add the code to your .htaccess file for you when you click on SaveChanges. 

After that, you can change the access on .htaccess back to 644, 666, or whatever you feel appropriate.  I usually leave it loose until I get WP set up like I want which can take a while.

If the 'change your access levels' stuff sounds like "blah, blah, blah", you should be able to do it in cpanel/file manager or with the FTP client that you used to upload WP to  your site.  If that sentence sounds like "blah, blah, blah" then get your webhost or webmaster to do it for you.

Hope that helps!

Hi folks

I have just uploaded Wordpress to my new domain name and I am in the process of altering my permalinks to make them a custom appearance called ' /%postname%/ ' . This makes the title of each post the URL of that post. However, wordpress now needs me to update my htaccess file with the following code:

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

What do I do with this code? What is htaccess? Help !!!  Angry Angry
Logged

valpubs
Sr Member
Offline Offline

Joined January 13, 2009
Location: Gloucester, UK
Forum Posts: 1,207
Age: 42


Lil 'ol Me

View Profile WWW Ignore This User
« Reply #9 on: May 29, 2009, 03:27:15 PM »

Hey Joe

Many thanks.. t'was not too geeky but I believe I have found an easier way around it - I'll not have a blog!

I'll just make every page a static page and I'll throw up a blog over at blogger

Thanks all for your input on this

Val

Since everyone else has covered htaccess and what it is and does, I'll see if I can address the error message.

I've hit this 'error' many times - usually when I forget to make this one small tweak to the htaccess file -  and it almost always has to do with Wordpress not being able to automatically write the mod_rewrite section to your .htaccess file (which is automatically installed in the root of your WP installation).  It's similar to what you'll see if you go into Appearance/Editor and look at the message below the edit window; "You need to make this file writable before..." 

CAUTION - GEEKSPEAK AHEAD!

You need to change the access level (sometimes called permissions) on .htaccess from whatever it currently is (probably 644) to 755 (or - God forbid - 777) so that it is writeable by Wordpress. 

Once you've done that, go back into permalinks and select custom (I usually do /%category%/%postname%/ since I have categories set up as keywords), and WP will add the code to your .htaccess file for you when you click on SaveChanges. 

After that, you can change the access on .htaccess back to 644, 666, or whatever you feel appropriate.  I usually leave it loose until I get WP set up like I want which can take a while.

If the 'change your access levels' stuff sounds like "blah, blah, blah", you should be able to do it in cpanel/file manager or with the FTP client that you used to upload WP to  your site.  If that sentence sounds like "blah, blah, blah" then get your webhost or webmaster to do it for you.

Hope that helps!

Hi folks

I have just uploaded Wordpress to my new domain name and I am in the process of altering my permalinks to make them a custom appearance called ' /%postname%/ ' . This makes the title of each post the URL of that post. However, wordpress now needs me to update my htaccess file with the following code:

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

What do I do with this code? What is htaccess? Help !!!  Angry Angry
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Free PLR | RRW Login | Help | Forum | Blog | Earnings Disclaimer | Copyright Notice | Privacy | Terms | Disclosure | Rights Disclosure
Powered by SMF | SMF © 2006-2008, Simple Machines LLC