| Re: .htaccess help |
| by Peekay on 2006/7/2 22:25:10 Quote:
To use .htaccess and mod_rewrite with XAMPP, you have to edit xampp/apache/conf/http.conf 1) Check around line 221 the entry: AddType application/x-httpd-php .php .php3 .phtml and make sure the .phtml extension is present. 2) Around line 414, check that the entry specifies the .htaccess file: AccessFilename .htaccess 3) Around line 166, uncomment the Line: #LoadModule rewrite_module modules/mod_rewrite.so 4) Check the entry around line 362. If it reads: AllowOverride None change it to: AllowOverride All You need to re-start the Apache server for the effects to take place. Mod_rewrite may already be enabled on your shared server. Not all hosts allow you to create .htaccess files, but if yours does, upload two files - test1.html and test2.html - and place a simple .htaccess file in the same folder. The contents should read: le="color: #000000"><?php # Test rewrite is on RewriteEngine On RewriteRule ^test1.html$ /test2.html [R=301] # If you then enter the URL to test1.html in a browser and wind up looking at test2.html... it's working. |
| Re: .htaccess help |
| by Peekay on 2006/7/2 22:00:13 Ah, I see. Not so good then. We now FTP all files between the Linux box, Macs and PCs in my studio because of the linefeed issue. It's drag-n-drop with the new FTP apps so we don't really find it a hassle. I would have thought Samba would have catered for the discrepancy? |
| Re: .htaccess help |
| by Kmac01 on 2006/7/2 21:36:54 Quote:
True, but my situation is a little different. I use samba to map a share over my network. Then I can edit the files directly and don't need to ftp anything. |
| Re: .htaccess help |
| by Kmac01 on 2006/7/2 21:30:52 Quote:
Well, during my testing I found the FilesMatch to be more for blocking a file or type of file like images. If you use <FileMatch test.html> then that one particular file will be blocked (works with wildcards also) but I could not get it to work on a directory only files. And I think the LocationMatch is also only allowed in the httpd.conf file not .htaccess. |
| Re: .htaccess help |
| by Peekay on 2006/7/2 21:30:06 Quote:
FTP in ascii mode. Will automatically convert linefeeds to Unix/Linux format. Always FTP PHP files in ascii mode for this reason. |