.htacess blues :)

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
soulja90
Forum Members
Forum Members
Posts: 83
Joined: Tue Mar 13, 2007 10:56 pm

.htacess blues :)

Post by soulja90 »

Hello,

I changed to seo friendly urls:

http://www.wdclub.com/articles/dropshipper-reviews.htm

but the third level links appear link this:

http://www.wdclub.com/articles/dropship ... opshippers

how can i fix that to:

http://www.wdclub.com/articles/dropship ... ippers.htm

it works on the first level www.wdclub.com second level www.wdclub.com/whatever but the third level screws up at www.wdclub.com/whatever/hereisthescrewup

Thanks

I am using redirects on some pages but i dont think that should do anything -pro help needed
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: .htacess blues :)

Post by Nullig »

They don't appear as 3rd level menu items to me, they appear as separate links within the page.

Perhaps you should look at the way you've created the link.

Nullig
soulja90
Forum Members
Forum Members
Posts: 83
Joined: Tue Mar 13, 2007 10:56 pm

Re: .htacess blues :)

Post by soulja90 »

i just used the {sitmap } tag so i dont have to type all that information
Pierre M.

Re: .htacess blues :)

Post by Pierre M. »

You have working URLs like http://www.wdclub.com/articles/s-e-o/ho ... ngines.htm
(found via home, resources, seo, top 10)
So you have a example of what to do for http://www.wdclub.com/articles/dropship ... -batteries
I beg there is some mess in page aliases (in CMSms). But may be .htaccess too.
Pierre M.
soulja90
Forum Members
Forum Members
Posts: 83
Joined: Tue Mar 13, 2007 10:56 pm

Re: .htacess blues :)

Post by soulja90 »

well what do you guys suggest i should do - change it back to www.mysite.com/url instead of url.htm? that didn't cause issues
Pierre M.

Re: .htacess blues :)

Post by Pierre M. »

You need coherence of page aliases (foobar) and page extension (.html) to have working foobar.html
And these should be set ok with the rewrite rule.
Please show us :
-an extract of your config.php with pretty URLs settings
-an extract of your .htaccess, pU section too
-a working page alias and URL
-a non working page alias and URL
and anything else needed to diagnose your problem (reverse proxy, module hack, patch...)

Pierre M.
soulja90
Forum Members
Forum Members
Posts: 83
Joined: Tue Mar 13, 2007 10:56 pm

Re: .htacess blues :)

Post by soulja90 »

Extract of Config :

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = true;

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

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true;

#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.comparent/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.comindex.php?page=somecontent)
$config['query_var'] = 'page';

=========================================

Extract of .htacess file

redirect 301 /american-dropshipper.html http://www.wdclub.com/articles/dropship ... hipper.htm


Options +FollowSymLinks
RewriteEngine on
RewriteBase /

# 301 Redirect all requests that don't contain a dot or trailing slash to
# include a trailing slash
# RewriteCond %{REQUEST_URI} !/$
# RewriteCond %{REQUEST_URI} !\.
# 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 [NC]
RewriteCond %{REQUEST_FILENAME} !-d [NC]
RewriteRule ^(.+).htm$ index.php?page=$1 [QSA]

=======================================

working page url: http://www.wdclub.com/articles/s-e-o/ho ... ngines.htm

========================================

not working url: Click on any of the links here and they give this long ridiculors url:

http://www.wdclub.com/articles/dropshipper-reviews.htm

when you drag your mouse on top of the link its shows the normal link, but once clicked,
the url changes to the long weird one

THANKS

for helping me out

JB

========================================
Pierre M.

Re: .htacess blues :)

Post by Pierre M. »

Hello JB,
soulja90 wrote: Extract of Config :
$config['assume_mod_rewrite'] = true;
$config['internal_pretty_urls'] = true;
This seems incompatible. If you use mod_rewrite, you should switch off the internal mechanism.
try just to change $config['internal_pretty_urls'] = false;
Then we will see further if needed.
Pierre M.
Post Reply

Return to “CMSMS Core”