The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

mod_rewrite troubleshoot

Discussion in 'General Discussion' started by jaimebien, Jun 23, 2007.

  1. jaimebien

    jaimebien Registered

    Joined:
    Jun 23, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hi, I know this question has been asked a trillion times, so I'll try not to repeat stuff. Basically, I need help with mod_rewrite. Following the instructions on this thread, I checked my loaded modules to see if mod_rewrite was listed. And it was. My mod_rewrite works fine on my computer (I was the wamp server for local stuff) and it looks like this

    Code:
    RewriteEngine on
    
    	RewriteRule ^([A-Za-z0-9-_]+)$ $1/ [R]
    		RewriteRule ^([A-Za-z0-9-_]+)/?$ index.php?dir=&page=$1 
    																#[NC]?
    
    	RewriteRule ^([A-Za-z0-9-_/]+)/([A-Za-z0-9-_]+)$ $1/$2/ [R]
    		RewriteRule ^([A-Za-z0-9-_/]+)/([A-Za-z0-9-_]+)/?$ index.php?dir=$1&page=$2 
    																					#[NC]?	
    		#absolute link for above?
    
    Options -indexes
    I just can't figure out why I keep getting error 500. Any ideas?

    Oh yeah, and with finding the httpd.conf file, where do I go to find it? I've opened every single folder (not one of which looks remotely like conf or anything) and still can't find it.

    Thanks! :)
     
  2. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    httpd.conf

    httpd.conf normally is located here: /usr/local/apache/conf/httpd.conf

    you should first run in shell

    # nice updatedb

    once that is done - then you can use the locate command to find files/folders

    ie
    # locate httpd.conf

    :)

    hope that helps
     
  3. jaimebien

    jaimebien Registered

    Joined:
    Jun 23, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    thanks

    Hey thanks. I just downloaded PuTTY to access shell, but apparently I don't have it enabled. I assume this is to do with my host and I should contact them?

    Btw, is the mod_rewrite problem I'm having to do with it not being properly enabled (??) or has there been a mistake on my part?

    Cheers!
     
  4. hostmedic

    hostmedic Well-Known Member

    Joined:
    Apr 30, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Washington Court House, Ohio, United States
    cPanel Access Level:
    DataCenter Provider
    begin w/ the host

    is this your own server? or are you renting space off someones server?

    shell access generally uses port 22 - but for security normally gets changed.

    I would contact the host first
     
Loading...

Share This Page