YellowMonkeyMan
03-02-2010, 01:36 PM
Hi there
I don't know if anyone can help me with this, but I would be incredibly grateful if anyone could. I'm trying to get various pages in my website to redirect properly. Specifically I would like the following:
* http://www.transym.com/ to redirect to my homepage, currently it goes to the 'Page not found' page.
* All my various pages to go to load without having to type in the .htm extension. This currently works, however, minor edits of the .htaccess file cause it to fail (see below). For example, I would like http://www.transym.com/download to go to http://www.transym.com/download.htm
My .htaccess file currently reads as follows:
Options +FollowSymLinks +ExecCGI
#redirect 301 / http://www.transym.com/index.htm
redirect 301 /about-us http://www.transym.com/about-us.htm
redirect 301 /best-accuracy http://www.transym.com/best-accuracy.htm
redirect 301 /case-studies http://www.transym.com/case-studies.htm
redirect 301 /cci-rely-on-transym-to-add-more-power http://www.transym.com/cci-rely-on-t...more-power.htm
redirect 301 /clients http://www.transym.com/clients.htm
redirect 301 /contact http://www.transym.com/contact.htm
redirect 301 /cost-effective http://www.transym.com/cost-effective.htm
redirect 301 /dedication-to-quality http://www.transym.com/dedication-to-quality.htm
redirect 301 /download http://www.transym.com/download.htm
redirect 301 /download-sample-source-code http://www.transym.com/download-sample-source-code.htm
redirect 301 /ease-of-integration http://www.transym.com/ease-of-integration.htm
redirect 301 /evaluate-today http://www.transym.com/evaluate-today.htm
redirect 301 /faqs http://www.transym.com/faqs.htm
redirect 301 /history http://www.transym.com/history.htm
redirect 301 /index http://www.transym.com/index.htm
redirect 301 /integration-tips http://www.transym.com/integration-tips.htm
redirect 301 /mission http://www.transym.com/mission.htm
redirect 301 /prime-recognition-praise-transym-for-accuracy http://www.transym.com/prime-recogni...r-accuracy.htm
redirect 301 /purchase http://www.transym.com/purchase.htm
redirect 301 /resellers http://www.transym.com/resellers.htm
redirect 301 /rich-feature-list http://www.transym.com/rich-feature-list.htm
redirect 301 /sitemap http://www.transym.com/sitemap.htm
redirect 301 /success http://www.transym.com/success.htm
redirect 301 /support http://www.transym.com/support.htm
redirect 301 /technical http://www.transym.com/technical.htm
redirect 301 /terms-and-conditions http://www.transym.com/terms-and-conditions.htm
redirect 301 /testimonials http://www.transym.com/testimonials.htm
redirect 301 /the-selection-conundrum http://www.transym.com/the-selection-conundrum.htm
redirect 301 /tocr-the-integrators-choice http://www.transym.com/tocr-the-integrators-choice.htm
redirect 301 /version-comparison http://www.transym.com/version-comparison.htm
redirect 301 /notfound http://www.transym.com/notfound.htm
redirect 301 /LSSPLanding/LSSPLanding http://www.transym.com//LSSPLanding/LSSPLanding.html
ErrorDocument 404 /notfound.htm
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^transym.com [NC]
RewriteRule ^(.*)$ http://www.transym.com/$1 [L,R=301]
# uncomment the following line, if you are having trouble
# getting no_script_name to work
RewriteBase /
# we skip all files with .something
# comment the following 3 lines to allow periods in routes
#RewriteCond %{REQUEST_URI} \..+$
#RewriteCond %{REQUEST_URI} !\.html$
#RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# big crash from our front web controller
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"
A few other things:
* I didn't really design this website, we had someone do that for us in the beginning. I simply bought a copy of Expression Web 3, imported the old site, and tweaked it as best I could, used an HTML verifier etc. I'm not a web designer so I've found myself in no end of muddles with this, and a lot of the code in that file isn't mine and I'm not sure what it does (in fact the only ones I know are the redirects and the ErrorDocument 404).
* I have tried removing the # from the beginning of the first redirect, thinking it would solve my homepage problem. It did, however it then caused the other redirects to fail - so http://www.transym.com/download wouldn't link to http://www.transym.com/download.htm - it also caused my the ErrorDocument 404 line from being effective, so people weren't even being directed to the 'page not found' page.
* I have been editing this file in Notepad, and I've read that .htaccess files can be problematic in Notepad. Does anyone have any idea if this is why I'm having the problem? Bear in mind it definitely is saved as .htaccess and not .htaccess.txt
Any help anyone could give me I'd be very, very appreciative. I've tried to learn all this stuff from scratch but all I've been doing half the time is scratching my head!
Thanks a lot in advance.
I don't know if anyone can help me with this, but I would be incredibly grateful if anyone could. I'm trying to get various pages in my website to redirect properly. Specifically I would like the following:
* http://www.transym.com/ to redirect to my homepage, currently it goes to the 'Page not found' page.
* All my various pages to go to load without having to type in the .htm extension. This currently works, however, minor edits of the .htaccess file cause it to fail (see below). For example, I would like http://www.transym.com/download to go to http://www.transym.com/download.htm
My .htaccess file currently reads as follows:
Options +FollowSymLinks +ExecCGI
#redirect 301 / http://www.transym.com/index.htm
redirect 301 /about-us http://www.transym.com/about-us.htm
redirect 301 /best-accuracy http://www.transym.com/best-accuracy.htm
redirect 301 /case-studies http://www.transym.com/case-studies.htm
redirect 301 /cci-rely-on-transym-to-add-more-power http://www.transym.com/cci-rely-on-t...more-power.htm
redirect 301 /clients http://www.transym.com/clients.htm
redirect 301 /contact http://www.transym.com/contact.htm
redirect 301 /cost-effective http://www.transym.com/cost-effective.htm
redirect 301 /dedication-to-quality http://www.transym.com/dedication-to-quality.htm
redirect 301 /download http://www.transym.com/download.htm
redirect 301 /download-sample-source-code http://www.transym.com/download-sample-source-code.htm
redirect 301 /ease-of-integration http://www.transym.com/ease-of-integration.htm
redirect 301 /evaluate-today http://www.transym.com/evaluate-today.htm
redirect 301 /faqs http://www.transym.com/faqs.htm
redirect 301 /history http://www.transym.com/history.htm
redirect 301 /index http://www.transym.com/index.htm
redirect 301 /integration-tips http://www.transym.com/integration-tips.htm
redirect 301 /mission http://www.transym.com/mission.htm
redirect 301 /prime-recognition-praise-transym-for-accuracy http://www.transym.com/prime-recogni...r-accuracy.htm
redirect 301 /purchase http://www.transym.com/purchase.htm
redirect 301 /resellers http://www.transym.com/resellers.htm
redirect 301 /rich-feature-list http://www.transym.com/rich-feature-list.htm
redirect 301 /sitemap http://www.transym.com/sitemap.htm
redirect 301 /success http://www.transym.com/success.htm
redirect 301 /support http://www.transym.com/support.htm
redirect 301 /technical http://www.transym.com/technical.htm
redirect 301 /terms-and-conditions http://www.transym.com/terms-and-conditions.htm
redirect 301 /testimonials http://www.transym.com/testimonials.htm
redirect 301 /the-selection-conundrum http://www.transym.com/the-selection-conundrum.htm
redirect 301 /tocr-the-integrators-choice http://www.transym.com/tocr-the-integrators-choice.htm
redirect 301 /version-comparison http://www.transym.com/version-comparison.htm
redirect 301 /notfound http://www.transym.com/notfound.htm
redirect 301 /LSSPLanding/LSSPLanding http://www.transym.com//LSSPLanding/LSSPLanding.html
ErrorDocument 404 /notfound.htm
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^transym.com [NC]
RewriteRule ^(.*)$ http://www.transym.com/$1 [L,R=301]
# uncomment the following line, if you are having trouble
# getting no_script_name to work
RewriteBase /
# we skip all files with .something
# comment the following 3 lines to allow periods in routes
#RewriteCond %{REQUEST_URI} \..+$
#RewriteCond %{REQUEST_URI} !\.html$
#RewriteRule .* - [L]
# we check if the .html version is here (caching)
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
# no, so we redirect to our front web controller
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
# big crash from our front web controller
ErrorDocument 500 "<h2>Application error</h2>symfony application failed to start properly"
A few other things:
* I didn't really design this website, we had someone do that for us in the beginning. I simply bought a copy of Expression Web 3, imported the old site, and tweaked it as best I could, used an HTML verifier etc. I'm not a web designer so I've found myself in no end of muddles with this, and a lot of the code in that file isn't mine and I'm not sure what it does (in fact the only ones I know are the redirects and the ErrorDocument 404).
* I have tried removing the # from the beginning of the first redirect, thinking it would solve my homepage problem. It did, however it then caused the other redirects to fail - so http://www.transym.com/download wouldn't link to http://www.transym.com/download.htm - it also caused my the ErrorDocument 404 line from being effective, so people weren't even being directed to the 'page not found' page.
* I have been editing this file in Notepad, and I've read that .htaccess files can be problematic in Notepad. Does anyone have any idea if this is why I'm having the problem? Bear in mind it definitely is saved as .htaccess and not .htaccess.txt
Any help anyone could give me I'd be very, very appreciative. I've tried to learn all this stuff from scratch but all I've been doing half the time is scratching my head!
Thanks a lot in advance.