Page 1 of 1

Pretty URLs mod_rewrite = 404 not found

Posted: Mon Aug 23, 2010 8:58 pm
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!

Re: Pretty URLs mod_rewrite = 404 not found

Posted: Mon Aug 23, 2010 11:11 pm
by replytomk3
If you PM me all login info I can play around. Are you sure you are not in a subfolder?

Re: Pretty URLs mod_rewrite = 404 not found

Posted: Fri Sep 03, 2010 10:37 pm
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...

Re: Pretty URLs mod_rewrite = 404 not found

Posted: Wed Nov 10, 2010 6:12 am
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?

Re: Pretty URLs mod_rewrite = 404 not found

Posted: Wed Nov 10, 2010 7:24 am
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  :)