• I want to thank all the members that have upgraded your accounts. I truly appreciate your support of the site monetarily. Supporting the site keeps this site up and running as a lot of work daily goes on behind the scenes. Click to Support Signs101 ...

.htaccess Help

Fred Weiss

Merchant Member
I'm in the process of upgrading another website with software that includes SEO features. Their less than wonderful instructions are for the SEO to work, an .htaccess file must be added to the site with a copy and paste of code they are supplying. The first line appears to me to need modification for the path but their instructions do not cover it and their support is temporarily not available. They also do not cover what permission the file should be set to ... but comparing to other .htaccess files, I am assuming a 755 permission is appropriate. The opening line is:

#SuPHP_ConfigPath /home1/xxxxxxx/public_html/php.ini

What change, if any, should I make for this to enable the SEO rewriting?
 

particleman

New Member
That line in particular won't deal the MOD_REWRITE extension. That is an apache extension and is separate from php.

You should have a block of text to add to the .htaccess file that looks something like this.

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

That is the typical mod_rewrite block for wordpress which will probably be different for what you are doing. RewriteEngine On actually turns it on and the rest are rewrite rules.


The php.ini file you are pointing to though looks like it just needs to be pointing the root folder of your website. So you just need to find the page to the public_html folder your site files are in and put it there instead. I would guess that whatever it is doing will still work since your server installation already has a php.ini file that holds default settings, but most of them can be overridden.
 

Fred Weiss

Merchant Member
Thanks for your reply.

There's a fairly lengthy amount of code I didn't post which is pretty much as you describe. And the instructions are to put the file into the folder for their application. Putting it there does not seem to have any effect. What I am trying to figure out is the opening line

#SuPHP_ConfigPath /home1/xxxxxxx/public_html/php.ini

Is the string of seven "x"s normal or is that something I'm supposed to change to complete the correct path? Or just ignore it because of the # at the start?
 

Doc Savage

New Member
the xxxxx part is usually the username of the account holder. For example if your account login name for the hosting account is Fred_Weiss then the string would be

#SuPHP_ConfigPath /home1/Fred_Weiss/publichtml/php.inI

That also assumes that the hosting company houses all their accounts in the home1 directory.
 

particleman

New Member
You'll have to determine the path to your public_html folder. If you are on a shared host you should be able to find this path in cpanel pretty easy on the home page section of cpanel.

If adding the rewrite rules did nothing then you'll have to see if mod_rewrite is installed on your server or not. Again this depends on if you are on shared hosting or not. If you have a vps or dedicated server you'll likely need to install it. You usually need to enabled the AllowOverride All in the apache config file in order for it to be enabled also.
 
Top