Pretty URLs mod_rewrite = 404 not found

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
mrTron
New Member
New Member
Posts: 8
Joined: Tue Mar 24, 2009 1:24 pm

Pretty URLs mod_rewrite = 404 not found

Post by mrTron »

I recently installed CMSMS 1.8.2 and went about setting up pretty urls the same way i've had success with in the past.  1. Setup config.php with these settings:

Code: Select all

$config['url_rewriting'] = 'mod_rewrite';

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = '.html';

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = 'page';
2. setup an .htaccess file with the following:

Code: Select all

Options +FollowSymLinks
  RewriteEngine on
  RewriteBase /
 
  # 301 Redirect all requests that don't contain a dot or trailing slash to
  # include a trailing slash
  # except for form POSTS
  RewriteCond %{REQUEST_URI} !/$
  RewriteCond %{REQUEST_URI} !\.
  RewriteCond %{REQUEST_METHOD} !POST$
  RewriteRule ^(.*) %{REQUEST_URI}/ [R=301,L]
 
  # Rewrites urls in the form of /parent/child/
  # but only rewrites if the requested URL is not a file or directory
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.+)$ index.php?page=$1 [QSA]
my site is currently in a domain i set up in plesk and am accessing via the server's ip vs. the actual domain as this is a rebuild of an existing site (not sure if that makes a difference..?)

when type in the domain, i get the home/index page, but clicking any of the cmsms links in the menu results in 404 not found errors.  The page addresses are being converted to pretty urls, ie: "http://xx.xx.xxx.xx/faq.html, but obviously these links mean nothing to the server/web browser.

what should i look into next?  what could be causing this?  thanks for any input!
replytomk3

Re: Pretty URLs mod_rewrite = 404 not found

Post by replytomk3 »

If you PM me all login info I can play around. Are you sure you are not in a subfolder?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Pretty URLs mod_rewrite = 404 not found

Post by Dr.CSS »

It sounds like you have it some what hidden behind numerical domain address as apposed to a domain.com address, seeing as it isn't live yet I wouldn't worry about pretty URLs till it goes live...
catchlight
Forum Members
Forum Members
Posts: 20
Joined: Wed Jan 28, 2009 1:12 am

Re: Pretty URLs mod_rewrite = 404 not found

Post by catchlight »

Hi there, I am having EXACTLY the same issue. I have installed pretty URLs exactly as above (like I usually do also) but just get a 404 also. Now, I am in a sub-folder until the site goes live, is this the cause of my woes!?

I know Pretty URLs are for search engines and we don't want our site indexed at this stage, but how can it be fixed, so it works while in development?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Pretty URLs mod_rewrite = 404 not found

Post by Rolf »

Hi Catchlight,
catchlight wrote: Now, I am in a sub-folder until the site goes live, is this the cause of my woes!?
Did you change in the .htaccess like:

Code: Select all

  RewriteEngine on
  RewriteBase /yoursubfoldername
Regards, Rolf  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Post Reply

Return to “CMSMS Core”