Kristina
06-09-2007, 11:24 AM
Newbie question here.
I'd like to modify my .htaccess file on a new domain that I just started WordPress on publishing with fantastico. I somehow did this with a previous domain but I keep running into problems with this new one.
What I did was create a text document, put the below in (and change it out to be my domain) and save it as: .htaccess - Then, I copied and pasted it into my FTP manager.
When I did this the whole template in wordpress disappeared.
So then I deleted it and pasted something else in and none of the interior pages worked after that. So I uninstalled WordPress and reinstalled it and am back to square one.
1) Can I create an .htaccess file with a text document? It doesn't seem to work.... I was thinking maybe I had the wrong stuff in the example below (which is what I used) or maybe I needed to modify the file date? Maybe there is so much in there?
2) If I can't use the txt file to create and paste in, how can I edit this file? :-) I'm a fairly quick study but I feel lost!
3) On my other domains, it only rewrites the root page. Any of the interior pages (http://mydomain.com/pagehere.html) 301 redirect to the homepage. I suppose that is ok but I would really prefer it to redirect to the sister page with the www on it instead. So any advice here would be awesome.
Thanks for any help someone can point me to!! Here is what I created in the txt file and pasted into my FTP manager.
# File modified on Fri Aug 18 22:55:52 2006 by server
# ReWrite is not a supported htaccess directive
# ReWrite Engine On
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^(.*)$ http://www.mydomain.com [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I'd like to modify my .htaccess file on a new domain that I just started WordPress on publishing with fantastico. I somehow did this with a previous domain but I keep running into problems with this new one.
What I did was create a text document, put the below in (and change it out to be my domain) and save it as: .htaccess - Then, I copied and pasted it into my FTP manager.
When I did this the whole template in wordpress disappeared.
So then I deleted it and pasted something else in and none of the interior pages worked after that. So I uninstalled WordPress and reinstalled it and am back to square one.
1) Can I create an .htaccess file with a text document? It doesn't seem to work.... I was thinking maybe I had the wrong stuff in the example below (which is what I used) or maybe I needed to modify the file date? Maybe there is so much in there?
2) If I can't use the txt file to create and paste in, how can I edit this file? :-) I'm a fairly quick study but I feel lost!
3) On my other domains, it only rewrites the root page. Any of the interior pages (http://mydomain.com/pagehere.html) 301 redirect to the homepage. I suppose that is ok but I would really prefer it to redirect to the sister page with the www on it instead. So any advice here would be awesome.
Thanks for any help someone can point me to!! Here is what I created in the txt file and pasted into my FTP manager.
# File modified on Fri Aug 18 22:55:52 2006 by server
# ReWrite is not a supported htaccess directive
# ReWrite Engine On
RewriteCond %{HTTP_HOST} ^mydomain.com$
RewriteRule ^(.*)$ http://www.mydomain.com [R=301,L]
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress