Go Back   HostGator Peer Support Forums > Public Forums > Pre-Sales Questions

Notices

Reply
 
Thread Tools
  #1  
Old 08-16-2009, 11:18 AM
spnr spnr is offline
Hatchling Croc
 
Join Date: Aug 2009
Posts: 2
Default Can't get mod_rewrite to work.

Hello all,

I couldn't get my mod_rewrite rules working so I'm trying a very basic rule first, but even that doesn't work. Here is my .htaccess file (in public_html):

Options +FollowSymlinks
AddHandler application/x-httpd-php5 .php

RewriteEngine On
RewriteRule ^test.php$ a.php
RewriteRule ^test2.php$ http://www.google.com

There is a file named a.php in the public_html folder. If I open test.php in my browser I get a blank screen, but if I open test2.php in my browser the redirect to google does work. I've tried /a.php instead of a.php and I've tried to add RewriteBase / and RewriteBase /public_html/, but nothing seems to work.

Any ideas?

Thanks in advance!
Reply With Quote
  #2  
Old 08-17-2009, 01:42 AM
spnr spnr is offline
Hatchling Croc
 
Join Date: Aug 2009
Posts: 2
Default Re: Can't get mod_rewrite to work.

Never mind, got it working.
Reply With Quote
Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mod_rewrite Clearlime Shared Hosting Support 0 03-02-2007 01:27 PM
Can't make mod_rewrite/htaccess work derivatives_programmer Pre-Sales Questions 3 09-13-2006 03:06 PM
mod_rewrite Unregistered Pre-Sales Questions 4 02-22-2006 08:56 PM
mod_rewrite deepsignal Pre-Sales Questions 4 07-19-2005 12:34 PM
mod_rewrite Unregistered Pre-Sales Questions 1 03-22-2005 01:38 PM

All times are GMT -5. The time now is 11:23 PM.