htaccess file question
4 posts by 3 authors in: Forums > CMS Builder
Last Post: February 25, 2008 (RSS)
By JamesKB - February 20, 2008
What would I place in my .htaccess file to send visitors to foo.php when they try to access foo.html?
Have a nice day....
--
JamesKB
--
JamesKB
Re: [JamesKB] htaccess file question
By Dave - February 21, 2008
You'd have to experiment. Each web host provider decides how much you can change with your .htaccess files. Some allow more than others. But you might try something like this:
RedirectMatch foo.html foo.php
See the "redirect" directives here (for Apache 1.xx):
http://httpd.apache.org/docs/1.3/mod/mod_alias.html
Or here (for Apache 2.xx):
http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect
And a google search for "apache redirect" will have lots of tutorials as well:
http://www.google.com/search?q=apache+redirect
Hope that helps! :)
RedirectMatch foo.html foo.php
See the "redirect" directives here (for Apache 1.xx):
http://httpd.apache.org/docs/1.3/mod/mod_alias.html
Or here (for Apache 2.xx):
http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect
And a google search for "apache redirect" will have lots of tutorials as well:
http://www.google.com/search?q=apache+redirect
Hope that helps! :)
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com
Re: [Dave] htaccess file question
By InHouse - February 25, 2008
Just a word to the wise for others who might follow this post as I recently did... and painted myself into a corner.
Adding the following to your .htaccess file causes problems with the WYSIWYG editor:
However, the following is okay:
I tried to get cute and put both into the .htaccess file. The three-letter extension would have to have some sort of exception when applied to the '/cmsAdmin/tinymce3/' dir.
Jayme
Adding the following to your .htaccess file causes problems with the WYSIWYG editor:
RedirectMatch (.*)\.htm$ $1.php
However, the following is okay:
RedirectMatch (.*)\.html$ $1.php
I tried to get cute and put both into the .htaccess file. The three-letter extension would have to have some sort of exception when applied to the '/cmsAdmin/tinymce3/' dir.
Jayme
Re: [InHouse] htaccess file question
By Dave - February 25, 2008
InHouse, Thanks for the tip!
Dave Edis - Senior Developer
interactivetools.com
interactivetools.com