Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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:
    544
    Likes Received:
    0
    Trophy Points:
    166
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jaimebien

    jaimebien Registered

    Joined:
    Jun 23, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    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:
    544
    Likes Received:
    0
    Trophy Points:
    166
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice