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

Notices

Reply
 
Thread Tools
  #1  
Old 04-09-2009, 08:06 AM
rama76p rama76p is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 4
Default mod_rewrite and modx cms

I've set up modx cms on a hostgator site. I'm trying to use htaccess and mod_rewrite to enable friendly urls. However I am getting 404 errors. Here is my htaccess file.

#Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]


Any help will be appreciated. Thanks
Reply With Quote
  #2  
Old 04-09-2009, 10:05 AM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: mod_rewrite and modx cms

Just to confirm-- if you manually go to index.php?q=something, it works?
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #3  
Old 04-09-2009, 10:50 AM
rama76p rama76p is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 4
Default Re: mod_rewrite and modx cms

Yes it does.
Reply With Quote
  #4  
Old 04-09-2009, 03:28 PM
slapshotw's Avatar
slapshotw slapshotw is offline
Veteran Croc
 
Join Date: Jun 2006
Posts: 5,164
Default Re: mod_rewrite and modx cms

Is that the only thing in your htaccess?
__________________
Follow me on Twitter! http://twitter.com/mrw
Reply With Quote
  #5  
Old 04-09-2009, 03:31 PM
rama76p rama76p is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 4
Default Re: mod_rewrite and modx cms

yes. there are some other lines but they are all commented out.
Reply With Quote
  #6  
Old 04-09-2009, 07:25 PM
chipd chipd is offline
Hatchling Croc
 
Join Date: May 2008
Location: Ontario, Canada
Posts: 1
Default Re: mod_rewrite and modx cms

Silly question, but is your modx setup in the root of the site so you would access it as yourdomain.com/index.php or in a subfolder such as yourdomain.com/modx/index.php?

If it's the latter then you will need to set the "RewriteBase" to the name for the sub-folder, such as "RewriteBase /modx/"
Reply With Quote
  #7  
Old 04-09-2009, 08:27 PM
rama76p rama76p is offline
Hatchling Croc
 
Join Date: Apr 2009
Posts: 4
Default Re: mod_rewrite and modx cms

it is in the root folder. i access it at mydomain.com/index.php
Reply With Quote
  #8  
Old 11-11-2009, 02:07 AM
madeofpixels madeofpixels is offline
Hatchling Croc
 
Join Date: Nov 2009
Posts: 1
Default Re: mod_rewrite and modx cms

Quote:
I've set up modx cms on a hostgator site. I'm trying to use htaccess and mod_rewrite to enable friendly urls. However I am getting 404 errors.
I have just set up a new MODx install in the root folder, with friendly urls turned off and all pages are defaulting to Hostgator's 404 page.

Anyone have any suggestions on how to fix this?
Reply With Quote
  #9  
Old 11-11-2009, 02:53 AM
gwyneth's Avatar
gwyneth gwyneth is offline
Supreme Croc
 
Join Date: Sep 2006
Location: up north
Posts: 6,843
Default Re: mod_rewrite and modx cms

Double check that you set the nameservers correctly at the domain's registrar, to the ones provided in the HG welcome email. Does anything show up--i.e., a simple page not related to modx?
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 blah Pre-Sales Questions 16 01-21-2011 09:23 PM
Mod_Rewrite GOODY Off-Topic 12 05-12-2008 08:35 PM
MODx gwyneth Webhosting 4 12-04-2007 09:35 PM
mod_rewrite Clearlime Shared Hosting Support 0 03-02-2007 01:27 PM
mod_rewrite Unregistered Pre-Sales Questions 4 02-22-2006 08:56 PM

All times are GMT -6. The time now is 04:28 AM.