Jul 05, 2009, 01:38 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: 1 ... 13 14 [15] 16 17 ... 20   Go Down
  Print  
Author Topic: Getting Friendly URLs to work  (Read 76292 times)
0 Members and 1 Guest are viewing this topic.
kalonjee
New Member
*
Posts: 4


« Reply #210 on: May 30, 2008, 01:45 AM »

Not sure if anyone has come accross this one..
I have enabled Furls on my site.  It works..but the only thing is that it doesn't load the proper content for the page.

I'll take you though it in case this sounds confusing.

My site is FlagsCalgary.com

e.g. If you click on any of the page links like: Banners Signs, Windsocks, you will notice that the urls change but the content on the page doesn't.

If i turn off FURLS, then everything works fine.

Anyone?
Logged
markg
Sr. Member
****
Posts: 302


« Reply #211 on: May 30, 2008, 11:01 PM »

Kalonjee,

will probably need more info like your htaccess code, and a screen shot of your friendly URL site configuration page.
Logged
ettiene
Jr. Member
*
Posts: 37


« Reply #212 on: Jun 12, 2008, 11:47 AM »

Hi guys,

I've switched on FURL's on my site, following instructions on the wiki. But now any link I click on just goes to my home page. The links change, i.e. I changed it so it looks like /index.php?page=<alias>.html

But I'm not sure if I still need to do stuff to the .htaccess file.

My site is in the web root, and I'm running on linux with modx 0.9.6.1p2

Any help would be greatly appreciated.

Logged
OpenGeek
MODx Co-Founder
Foundation
*
Posts: 5,813


damn accurate caricatures...


WWW
« Reply #213 on: Jun 12, 2008, 12:45 PM »

I've switched on FURL's on my site, following instructions on the wiki. But now any link I click on just goes to my home page. The links change, i.e. I changed it so it looks like /index.php?page=<alias>.html

But I'm not sure if I still need to do stuff to the .htaccess file.
Do not use the prefix index.php?page=; that information is from the author of that wiki content and only applies if you do not have mod_rewrite/.htaccess capabilities (not even sure that method works at all anymore in fact).
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
CTO @ Collabpad
work productively.
work intelligently.
work together.
Light is just a vibration of a note too. Everything is. You've got to keep that in mind.
  Frank Zappa
ettiene
Jr. Member
*
Posts: 37


« Reply #214 on: Jun 12, 2008, 04:43 PM »

Thanks. That's good to know. So I've removed that prefix, left the suffix as .html, and now I get url's based on the alias, i.e. domain.com/<alias>.html . But I get a 404 error page now.

So I guess I'm still doing something wrong...

Logged
Delicious Agony
Jr. Member
*
Posts: 22


« Reply #215 on: Jun 16, 2008, 04:23 AM »

FURLS is working perfectly. I want to add my site to Google news. The include a site in Google news a url must have at least 3 numbers in the url.

Is there a way to add the docid to FURL like:
/news/article?g=docid
Logged
davidyy
Jr. Member
*
Posts: 5


« Reply #216 on: Jun 29, 2008, 08:53 PM »

Forgive me if this question has been asked elsewhere. But I couldn't find it in this thread or anywhere else.

The pages on my site all use the convention: mydomain.com/alias_of_this_page

I am using FURLs with all lower case aliases. Everything works as I'm intending except when visitors type alias_of_this_page with one or more upper case letters. I have the NC option on the rewriterule, but that does not force ALIAS_of_this_page to alias_of_this_page. It just ignores the case and passes through whatever the visitor typed. When that string gets passed through with upper case letters, Modx doesn't locate the page and sends the visitor to the default page.

Any help on how to force all the characters to lower so that the matching alias can be found? I tried a method using the int:tolower function but I get nothing but 500 errors anytime I try to include that in my .htaccess file.

Here is my .htaccess file as it currently exists.

Code:
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^mydomain\.com [NC]
RewriteRule (.*) http://mydomain.com/$1 [R=301,L,NC]

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

Thanks in advance!!
Logged
IG88
Full Member
***
Posts: 119


« Reply #217 on: Jul 01, 2008, 03:28 PM »

Having troubles here.

I own the webserver.

Loaded Modules mod_rewrite

I am getting a 404 Page not found.

Error log:
[Tue Jul 01 15:24:17 2008] [error] [client **.**.**.**] File does not exist: /home/****/public_html/login.htm, referer: http://www.****.com/

Settings:
Use Friendly URLS = yes
Use Friendly Aliases = yes
Use friendly alias path = yes

Logged
davidyy
Jr. Member
*
Posts: 5


« Reply #218 on: Jul 15, 2008, 10:25 PM »

Can anyone help with my issue posted below? I'm getting ready to bring my site live and this is the one major technical difficulty remaining.
Thanks!

Forgive me if this question has been asked elsewhere. But I couldn't find it in this thread or anywhere else.

The pages on my site all use the convention: mydomain.com/alias_of_this_page

I am using FURLs with all lower case aliases. Everything works as I'm intending except when visitors type alias_of_this_page with one or more upper case letters. I have the NC option on the rewriterule, but that does not force ALIAS_of_this_page to alias_of_this_page. It just ignores the case and passes through whatever the visitor typed. When that string gets passed through with upper case letters, Modx doesn't locate the page and sends the visitor to the default page.

Any help on how to force all the characters to lower so that the matching alias can be found? I tried a method using the int:tolower function but I get nothing but 500 errors anytime I try to include that in my .htaccess file.

Here is my .htaccess file as it currently exists.

Code:
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^mydomain\.com [NC]
RewriteRule (.*) http://mydomain.com/$1 [R=301,L,NC]

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

Thanks in advance!!
Logged
markg
Sr. Member
****
Posts: 302


« Reply #219 on: Jul 15, 2008, 11:04 PM »

David,

not particularly on this problem, but you should use hyphens instead of underscores.

I've just been researching on the net and it seems the vote is in that hyphens are more seo friendly than underscores.

I'm rebuilding a site that has underscores and am trying to use rewrites to convert them to hyphens. (No luck so far.)

See my post in the Navigation section on hypens and 301 reditrects.

http://modxcms.com/forums/index.php/topic,27324.0.html


I did find this quote that went"
.htaccess rewriting is voodoo, Damn cool voodoo, but voodoo nonetheless.

Some links that may be of help

http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url
http://www.htaccesselite.com/creating-seo-friendly-url-redirector-vt53.html

http://www.mattcutts.com/blog/dashes-vs-underscores/

There's lots of good reading in these links, which will keep you busy for awhile. You'll probably find your answer on one of these sites. You can even repost your question on a few of them.






Logged
davidyy
Jr. Member
*
Posts: 5


« Reply #220 on: Jul 16, 2008, 09:09 PM »

Thanks Mark. I'll look around those sites to see if I can find anything.

To clarify for others, on my aliases, they don't actually have underscores or hyphens in them. Sorry for the confusion in my example. I just put those in for readability. My page naming convention is:

mydomain.com/alias

but the problem is, many of my users type in:

mydomain.com/ALIAS

And when modx tries to match the characters after the slash to the alias in the database, modx resolves "ALIAS" != "alias" and thus a redirect to the default page.

I *think* my rewrite rules are working fine. What's tripping me seems to be the case sensitivity is modx's alias logic. I poked around the modx source for a while to see if I could hack a solution, but I wasn't successful.
Thanks again, Mark.
Logged
OpenGeek
MODx Co-Founder
Foundation
*
Posts: 5,813


damn accurate caricatures...


WWW
« Reply #221 on: Jul 17, 2008, 09:24 AM »

Just write a quick plugin attached to OnPageNotFound and have it look up the alias after doing a strtolower() on it.  If found, use $modx->sendRedirect to send it to the proper page/URL or $modx->sendForward() to leave the URL the same and just render the contents as is (though you may get penalized in search engines for having duplicate content with the latter approach).
Logged

Jason Coward
MODx Co-Founder
xPDO Founder
CTO @ Collabpad
work productively.
work intelligently.
work together.
Light is just a vibration of a note too. Everything is. You've got to keep that in mind.
  Frank Zappa
killorbytes
Member
**
Posts: 64


« Reply #222 on: Sep 03, 2008, 11:31 AM »

Hi guys, and gals. Not sure if this has been covered, but I just found a solution that (of course) seems weird but makes complete sense when you think about it.

I've had problems since the beginning working with the .htaccess and fURLs and have had situations where 2 IDENTICAL installs function differently. One worked, the other throws the 404. I have a subdomain (http://modxdemo.zerogny.net) pointing to a modxdemo subdomain on the server (BlueHost BTW). I set the rewrites to:

Options +FollowSymlinks
RewriteEngine On
RewriteBase /

as stated above in this thread.

So...here's why if you are working on a Mac and using Dreamweaver to edit your .htaccess file (as I was) that it never worked: The Macintosh line breaks where what was causing the file to not work! Unfortunately you can't SEE this, since the breaks are invisible. I stumbled upon it simply by T&E. I opened the file in BBEdit, changed the line breaks to "Unix" and then re-saved. Uploaded the file and "voila." It works.

Uuugh, hours and hours and it was a translation issue.

Cheers, hope this helps.
Logged
ettiene
Jr. Member
*
Posts: 37


« Reply #223 on: Sep 04, 2008, 04:41 PM »

Just for the other people out there who can't think straight like me and decided to host their sites on IIS Smiley , I had to have 404 and 405 custom error pages in place that redirects to /index.php . Then the MODx FURL's worked perfectly.

Thanks
Ettiene
Logged
Terry
Sr. Member
****
Posts: 321



WWW
« Reply #224 on: Sep 28, 2008, 04:38 PM »

Hi

I'm stuck trying to get Friendly URLs to work on my wamp server. 

I'm seeing the correct URLs  http://localhost/services.html   but I'm getting 404 errors on all the pages.

Here's what I've done.

The site has been developed on my local wamp server.
Modx is installed in the root directory
Head contains
<base href="[(site_url)]" />

Configuration Settings
   Use Friendly URLs is yes
   Prefix is blank
   Suffix is .html
   Friendly aliases is yes
   Friendly alias path is no
   Duplicate aliases is no
   Auto generate alias is yes

ht.access file contains
   RewriteEngine On
   RewriteBase /

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

ht.access file in manager folder is renamed

wamp\bin\apache2.2.6\conf\httpd.conf file has the following

   LoadModule rewrite_module modules/mod_rewrite.so     (uncommented)

   <Directory "c:/wamp/www/">
   AllowOverride all

I’ve cleared the cache in manager after each change

I noticed some characters at the line ends.  I removed them and resaved with notepad.

MODx version 0.9.6.1p2
PHP version 5.2.5
SQL version 5.0.45

Any suggestions?  Not sure where to go next with this one.

Thank you !

Terry
Logged

Pages: 1 ... 13 14 [15] 16 17 ... 20   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF | SMF © 2006-2008, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!