301 Redirect Internal Server Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of htaccess redirect internal server error this site About Us Learn more about Stack Overflow the company Business Learn htaccess redirect 500 internal server error more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question iis redirect 500 internal server error x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up
Redirect 500 Error Htaccess
500 server error while using 301 redirect up vote 0 down vote favorite I tried the following lines in .htaccess file and put it in includes folder: //301 Redirect Old File RewriteEngine on Redirect 301 includes/config.php includes/index.php I want when any user opens this file using url that he/she must be redirect to includes/index.php file. But I got the 500 server error. php htaccess 301 redirect apache .htaccess http-redirect share|improve this question edited Nov 13 '15 at 0:26 pnuts 33.7k63569 asked Dec 16 '13 at 13:46 Sagar Chhaniyara 515 show us your .htaccess file –ins0 Dec 16 '13 at 13:51 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted Reason of your 500 error is: Redirect to non-URL As you're missing leading slash in your matching pattern and target URL. Use this rule to fix it: Redirect 301 /includes/config.php /includes/index.php share|improve this answer answered Dec 16 '13 at 14:32 anubhava 380k32159231 add a comment| up vote 1 down vote try: Redirect 301 /includes/config.php http://yoursite.com/includes/index.php Although, if the htaccess is in the includes dir then you don't need /includes at all. The second url must also be full - as above. share|improve this answer answered Dec 16 '13 at 13:52 MarkP 1,53021643 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting y
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question http://stackoverflow.com/questions/20612490/500-server-error-while-using-301-redirect x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up 301 ReDirects producting a 500 Internal Server Error up vote 0 down vote favorite Whenever these 301 http://stackoverflow.com/questions/22912861/301-redirects-producting-a-500-internal-server-error redirects are added to a .htaccess file (content follows) I get a 500 Internal Sever error - and idea why? Much thanks in advance... Richard # BEGIN WordPress
code I put in was :RewriteCond %{HTTP_HOST} ^news.easytoinsureme\.com [NC]RewriteRule (.*) http://www.easytoinsureme.com/affordable-health-insurance/$1 [R=301,L] But for some reason this is not redirecting. There are a lot of things in this .htaccess file https://www.sitepoint.com/community/t/301-redirect-still-giving-500-error/17197 that may be conflicting, but I do not know enough about them to http://www.webdeveloper.com/forum/showthread.php?202301-HTACCESS-301-Redirect-causing-Internal-Server-Error troubleshoot. Can anyone help me? I am willing to paypal someone who can get me through this! dklynn 2012-06-11 04:16:01 UTC #2 s83, First, WHY ask here about code you picked-up elsewhere? Second, that is not a Redirect 301! That's because it is mod_rewrite code and the Redirect family of directives internal server belong to mod_alias. Third, other than a missing \ in the RewriteCond statement (and the simple fact that your :kaioken: EVERYTHING :kaioken: atom will effectively kill your news subdomain), there is nothing in this line code which would generate a 500 error. Fourth, if you believe that there are conflicts within your .htaccess, you must know that noone can help you with that internal server error until you post that code here, too. Fifth, please put your code in a [noparse] ... [/noparse] wrapper as is is preserved in replies and treats the content as code, not text. Finally, you might still benefit from reading the mod_rewrite tutorial linked in my signature as it contains explanations and sample code. It's helped may members and should help you, too. Regards, DK satori83 2012-06-11 05:02:24 UTC #3 I found that tutorial in a google search, and out of all of them it seemed the most straight forward. I am new to any redirects and htaccess stuff, I only attempted because it seemed doable. The 500 comes when I search google for an old blog post thats using the subdomain. If I type in the old url, news.easytoinsureme.com, it also doesnt redirect to new location of easytoinsureme.com/affordable-health-insurance. Here is the whole code, I only added the two lines I mentioned. # BEGIN Compress text files
Error If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 7 of 7 Thread: HTACCESS 301 Redirect causing Internal Server Error Tweet Thread Tools Show Printable Version Email this Page… Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 02-16-2009,07:21 AM #1 Mig View Profile View Forum Posts Visit Homepage Back in Black Join Date Jun 2005 Location London, UK Posts 191 HTACCESS 301 Redirect causing Internal Server Error I can't figure out what's causing my internal server error. This works OK: Code: Redirect 301 /apply.asp http://sub.example.co.uk/work.php Redirect 301 /default.asp http://sub.example.co.uk/ But it breaks if I add this line: Code: Redirect 301 /gallery.asp http://sub.example.co.uk/services/ Any ideas? Reply With Quote 02-16-2009,07:30 AM #2 scragar View Profile View Forum Posts Some Random Guy Join Date Jun 2003 Location here Posts 4,551 What are those two funny characters at the start of the line? If you are using PHP please use the [PHP] and [/PHP] forum tags for highlighting... The same applies to HTML and the forums [HTML][/HTML] tags. Reply With Quote 02-16-2009,09:26 AM #3 Mig View Profile View Forum Posts Visit Homepage Back in Black Join Date Jun 2005 Location London, UK Posts 191 Where? What characters? (Unless this is the problem) I see no non-standard characters other than alphanumeric and : / . Last edited by Mig; 02-16-2009 at 09:30 AM. Reply With Quote 02-16-2009,09:31 AM #4 scragar View Profile View Forum Posts Some Random Guy Join Date Jun 2003 Location here Posts 4,551 0x7F It's in the extended ascii table as a square. I'd remove them if you can, delete the whole line(possibly up to a couple of characters on the prev