hi
I have a problem . I want to make friendly url to work but I get stuck on part when I have to renema file to .htaccess///
I run modx on XP
and I install wamp server so I have apach under wamp, together with php.
I found ht.access but when I want to rename it into .htaccess XP give a error that I should give file name !!!
What should I do???
Load the file in Wordpad and use "Save As" to rename it.
try to open the file with notepad and then do "save as...", And then save as .htaccess (I am not sure if this works)
//edit: BobRay was just a minute faster :+
with regards,
Ronald Lokers
'Front-end developer' @
h2o Media
I found that, on Vista anyway, Notepad eats the EOL characters from the MODx files but Wordpad doesn’t.
Yes, this is always the tricky bit. It always catches me out.
You have to watch when you’re saving it to make sure it still doesn’t add the .txt extension, which it will probably do anyway.
Nor can you rename it via explorer ’cos windows won’t let you.
What I do is open the original ht.access file in Notepad, copy and paste my new instructions over the existing ones and then go "Save As" ".htaccess" and make sure "All Files" is selected in the drop down "Save AS Type" box.
Then have a look in the folder and look under the file type column. It should read HTACCESS, if so then it worked. If it still says .txt then it didn’t.
Also, don’t try to overwrite an existing txt file when saving, it will just then save the new file as a txt file. You have to create a new file. So, if you have a load of .htaccess.txt files in the folder, delete them first.
I’ve never been able to get this to work in Wordpad, so I stick with Notepad for this task.
Content Creator and Copywriter
I do it in Wordpad all the time -- just tested it again to make sure. I just right-click on ht.access, make my edits, select "save as" and change the name to .htaccess. It saves with no .txt extension (since .htaccess is the extension).
Hmm.. I just realized that I’m on Vista Ultimate and the question was about XP so that’s probably why.
Bob, just for my own curiosity, what file type do you select in the drop down box?
As I’m looking at it in XP, it forces the .txt extension on you anyway, even if you do call it.htaccess.
That’s why I always end up doing it in Notepad.
Content Creator and Copywriter
hi
yes notepad do the trick...thanks to everybody
I always do renames like this from a command window (ren ht.access .htaccess). It just renames the file, so no worries about some program messing up line endings.
-
☆ A M B ☆
- 24,524 Posts
Probably better to copy it (does XP have an equivalent of the cp command?) rather than renaming it, so you’ll still have the ht.access file to edit easily if necessary. That’s what I always do on my *nix variant servers (darwin, linux, and solaris).