Jump to content

.htaccess/.htpasswd Questions


owatagal
 Share

Recommended Posts

I'm looking at moving a couple domains into a reseller account, and will need some redirect features on the .htaccess file and would like to make use of an .htpasswd file to password protect directories.

 

Are there any limitations on what can be redirected through the .htaccess file? For one domain I will be stripping .asp file extensions and replacing ithem with .php. For another domain there will be some fairly significant architectural reorganization, so files will need permanent redirects. Is there any problem with this (the company where I currently host a .php site gives me only limited control over .htaccess functions, so I want to make sure I'll be able to convert my asp site to php with a minimum of hassle -- for which I need more .htaccess permissions than I currently have. Also, it would be convenient to be able to write permanent redirects, because I hate 404 pages).

 

And is it possible to save an .htpasswd file above the root level so that user names/passwords can be stored in a place that is not web-accessible? Alternatively, where are the user names/passwords saved if I set the option through CPanel (i.e. is it above the root or is the file web-accessible)?

 

I appreciate your help.

 

(I had another question on MySQL databases, but that was answered through another post. It's good to know I can query a database from multiple domains -- something else my current hosting plan doesn't let me do.)

Link to comment
Share on other sites

Are there any limitations on what can be redirected through the .htaccess file?
I dont beleive so but I have never tried to change asp to php before. I dont think it will be an issue but will leave the confirmation to one more knowledgable than I on that subject.

 

Also, it would be convenient to be able to write permanent redirects, because I hate 404 pages).

 

Can do

 

And is it possible to save an .htpasswd file above the root level so that user names/passwords can be stored in a place that is not web-accessible?

 

It already is above root, no need to change locations.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...