FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Two questions about the file ".htaccess"





likeabreeze
Before I came here and get wordpress installed,
I successfully installed local wordpress on XAMPP.
after installation,it created a file ".htaccess".
But today after I installed wordpress on my frihost free account,
I found there was no ".htaccess" in the folder.
Which, however, caused some problems,
one of which is,
the 404 error page is not the one in the wordpress(404.php),
but the default one of Apache(even after I deleted the 404.shtml).
Questions here:
1.Finally I found creating the file ".htaccess" was ALLOWED,so why didn't the wordpress installation create it at first?
2.How can I replace the default Apache 404 error page by the wordpress one(404.php)?(I guess it has something to do with .htaccess)
Bondings
Maybe you forgot to upload the .htaccess file? I'm not sure how it goes with a WordPress installation, but normalyl it either includes a sample .htaccess file or it generates one somewhere in the setup. Maybe check the source files (in zip I guess) for a .htaccess file or some htaccess.sample or so. Or maybe in the setup/admin you can find/generate one.
likeabreeze
Bondings wrote:
Maybe you forgot to upload the .htaccess file? I'm not sure how it goes with a WordPress installation, but normalyl it either includes a sample .htaccess file or it generates one somewhere in the setup. Maybe check the source files (in zip I guess) for a .htaccess file or some htaccess.sample or so. Or maybe in the setup/admin you can find/generate one.

Frihost Founder! Thanks for your reply!
but can u help me solve the problem No.2?

2.How can I replace the default Apache 404 error page by the wordpress one(404.php)?(I guess it has something to do with .htaccess)
codemaster
With out messing with any thing you just delete index.html that frihost gives and upload all wordpress files. That should not cost you any problems. In addition just upload it with out replacing 404. That should solve your problems and your wordpress should go fine.
likeabreeze
codemaster wrote:
With out messing with any thing you just delete index.html that frihost gives and upload all wordpress files. That should not cost you any problems. In addition just upload it with out replacing 404. That should solve your problems and your wordpress should go fine.


Yes , I did do as you told me, but it didn't work.
the 404 error page is still the default one of Apache:
--------------
Not Found
The requested URL /sdfs was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Apache/2 Server at ***.** Port 80
--------------
It's a small problem, everything else goes well!
But thanks for your reply!
likeabreeze
codemaster wrote:
With out messing with any thing you just delete index.html that frihost gives and upload all wordpress files. That should not cost you any problems. In addition just upload it with out replacing 404. That should solve your problems and your wordpress should go fine.


oh, I have deleted 401.shtml,403.shtml,404.shtml,500.shtml at the folder.
maybe that's the reason.....

but can anyone sent me the original files?
codemaster
It's okay that it's still default.
metalfreek
Here use this .htaccess and see what happens

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
likeabreeze
metalfreek wrote:
Here use this .htaccess and see what happens

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

THX for your reply!!
Yes , I did that.
This was what happened:
the 404 error page is neither the default Apache one nor the wordpress 404.php,
but the wordpress homepage (index.php)!

Well, that sounds just OK.
mmm,by the way, are u running wordpress on frihost?
metalfreek
likeabreeze wrote:
metalfreek wrote:
Here use this .htaccess and see what happens

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

THX for your reply!!
Yes , I did that.
This was what happened:
the 404 error page is neither the default Apache one nor the wordpress 404.php,
but the wordpress homepage (index.php)!

Well, that sounds just OK.
mmm,by the way, are u running wordpress on frihost?


Yes I am running wordpress on frihost.
Related topics
Two questions
Two questions
Two Questions
htaccess
Some not so commonly asked questions.
Two questions.
General .htaccess tutorial.
[php/cookies] poll on two sites
Linux installation
Ok Two Questions whic i really need answered :/
Samba Linux & IPCOP
Reading Directories
Greetings, Introductions, and Questions ^_^;
question about .htaccess mod_python with publisher mod
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.