You can have more than one .htaccess if they’re in different folders. Did you try to put the second one in the WP folder? It might work.
If not, you could combine the contents of both files into one with a text editor.
I tried putting both blocks of code in the same .htaccess file and then it messes up my wordpress site.
How would I go about separating the blocks so that wordpress works fine as well as my php.ini config code for a php upload form?
I’m probably confused, so forgive me if I’m stating the obvious here.
1) Your WP .htaccess file should be in the WP directory (you mention WP is in a subdirectory above — put it there).
2) php.ini file contents don’t go in ANY .htaccess file directly.
To have my WP blog run from my website root directory, I transferred the .htaccess and the index.php files from the subdirectory WP is installed in to the webroot (as instructed on the option/configuration page).
Additionally, I wrote a php upload form for my site. I had to configure the php.ini file to allow file access on my site so I could transfer files from the temp directory on the apache server to a directory in my website. After configuring the php.ini file I was instructed to drop this block of code into a .htaccess file on my webroot:
Options +ExecCGI
AddHandler php-cgi .php
Action php-cgi /cgi-bin/php.cgi
Therein lies the problem. The .htaccess already exists from WP with the following contents:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
If I put both blocks of code in the .htaccess file (regardless of the order), my WP page can’t load.
So how can I keep the functionality of my WP blog to not run off of the subdirectory (www.site.com/wordpress) but also put in the new code for my php upload form?
You lost me with the php upload file and the php.ini. I’m afraid I don’t know what you’re trying to do. Maybe HandySolo will understand.
Does anyone else have any thoughts regarding my previous posts?