apache - htaccess adding WWW and changing filename in subdirectory -


I know that such questions have come up, though often. I'm hoping for better luck!

I have an .htaccess file that adds everything to "www" in my original directory:

  RewriteCond% {SERVER_NAME} ^ RewriteEngine ^ Mysite.org RivetRail ^ (. *) $ Http://www.mysite.org/$1 [R = permanent, L]  

This generally works fine. I have a subfolder (/ myquiz /) in which the old index.html file has been replaced with index.php. I know that there are external links to /myquiz/index.html, so I have to make sure they are redirects. By leaving index.html in place and attempting to redirect from it gave birth to some strange behavior, but adding .htaccess to that directory works for it:

< Pre> RewriteEngine On RewriteBase / REERRR ^ ^ Index. Html = $ /myquiz/index.php [NC, R]

Index.php is trying to load the index as expected, and if WWW is needed Is added but requests of mysite.org/myquiz/index.php directly not connects to the WWW

I tried to add "RewriteEngine Heir", but as a result the call My Route Folder is a great move instead if I want to make a subfolder inaccessible, but here I am not helping Mr. try to add at the beginning of .htaccess my subfolders to address its root .htaccess, but it did not work better.

Any thoughts?

You will not need to add any other HTX file to the mapwiz folder in the root of this site in the htaccess file Should work. Remove the htaccess file in Myquiz and try it.

  Rewintngine on rewrite code% {HTTP_HOST} ^ MySite \ .org recreating ^ (. *) $ Http://www.mysite.org/$1 [R = 301, L] Otherwise, I will not use % {SERVER_NAME}  except for myquez /index.html.html / Root = 301, L]  

As long as you do not make sure that the name is set correctly in the config file, it can be more reliable than HTTP_HOST, otherwise if I select % {HTTP_HOST} instead.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -