Problems, need help? Have a tip or advice? Post it here.
6 posts Page 1 of 1
I'm have a ton of problems with pretty urls...

my index page is fine... it seems.

All the other pages are jacked up. I got the css relinked, but nothing I do will relink any JS files.

If I'm on "domain.com/contact" and click on "about" in the menu... I get "domain.com/contact/about.php" instead of "domain.com/about"

What is going on with this? I did uncomment the 404 error line.

.httaccess file below:

Options +FollowSymlinks -MultiViews
<IfModule mod_rewrite.c>
RewriteEngine On

#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it RewriteBase /subdomain1/subdomain2
RewriteBase /

#If you wish to use a custom 404 page, place a file named 404.php in your website's root and uncomment the line below.
#If your website is installed in a subfolder, change the line below to reflect the path to the subfolder.
#e.g. for http://www.example.com/subdomain1/subdomain2/ make it ErrorDocument 404 /subdomain1/subdomain2/404.php
ErrorDocument 404 /404.php

#If your site begins with 'www', uncomment the following two lines
#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]


#DO NOT EDIT BELOW THIS

RewriteRule ^index.php$ "" [R=301,L,QSA]

RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule . - [L]

#user_created_styles.php
RewriteRule ^user_created_styles$ "$0/" [R=301,L,QSA]
RewriteRule ^user_created_styles/$ user_created_styles.php [L,QSA]
RewriteRule ^user_created_styles/.*?([^\.\/]*)\.html$ user_created_styles.php?pname=$1 [L,QSA]
RewriteRule ^user_created_styles/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ user_created_styles.php?d=$1$2$3 [L,QSA]
RewriteRule ^user_created_styles/[^\.]*?([^/\.]*)/$ user_created_styles.php?fname=$1 [L,QSA]
RewriteRule ^user_created_styles/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#rss.php
RewriteRule ^rss$ "$0/" [R=301,L,QSA]
RewriteRule ^rss/$ rss.php [L,QSA]
RewriteRule ^rss/.*?([^\.\/]*)\.html$ rss.php?pname=$1 [L,QSA]
RewriteRule ^rss/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ rss.php?d=$1$2$3 [L,QSA]
RewriteRule ^rss/[^\.]*?([^/\.]*)/$ rss.php?fname=$1 [L,QSA]
RewriteRule ^rss/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#project_gallery.php
RewriteRule ^project_gallery$ "$0/" [R=301,L,QSA]
RewriteRule ^project_gallery/$ project_gallery.php [L,QSA]
RewriteRule ^project_gallery/.*?([^\.\/]*)\.html$ project_gallery.php?pname=$1 [L,QSA]
RewriteRule ^project_gallery/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ project_gallery.php?d=$1$2$3 [L,QSA]
RewriteRule ^project_gallery/[^\.]*?([^/\.]*)/$ project_gallery.php?fname=$1 [L,QSA]
RewriteRule ^project_gallery/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#global.php
RewriteRule ^global$ "$0/" [R=301,L,QSA]
RewriteRule ^global/$ global.php [L,QSA]
RewriteRule ^global/.*?([^\.\/]*)\.html$ global.php?pname=$1 [L,QSA]
RewriteRule ^global/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ global.php?d=$1$2$3 [L,QSA]
RewriteRule ^global/[^\.]*?([^/\.]*)/$ global.php?fname=$1 [L,QSA]
RewriteRule ^global/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#gallery.php
RewriteRule ^gallery$ "$0/" [R=301,L,QSA]
RewriteRule ^gallery/$ gallery.php [L,QSA]
RewriteRule ^gallery/.*?([^\.\/]*)\.html$ gallery.php?pname=$1 [L,QSA]
RewriteRule ^gallery/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ gallery.php?d=$1$2$3 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)/$ gallery.php?fname=$1 [L,QSA]
RewriteRule ^gallery/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#contact.php
RewriteRule ^contact$ "$0/" [R=301,L,QSA]
RewriteRule ^contact/$ contact.php [L,QSA]
RewriteRule ^contact/.*?([^\.\/]*)\.html$ contact.php?pname=$1 [L,QSA]
RewriteRule ^contact/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ contact.php?d=$1$2$3 [L,QSA]
RewriteRule ^contact/[^\.]*?([^/\.]*)/$ contact.php?fname=$1 [L,QSA]
RewriteRule ^contact/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#blog.php
RewriteRule ^blog$ "$0/" [R=301,L,QSA]
RewriteRule ^blog/$ blog.php [L,QSA]
RewriteRule ^blog/.*?([^\.\/]*)\.html$ blog.php?pname=$1 [L,QSA]
RewriteRule ^blog/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ blog.php?d=$1$2$3 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)/$ blog.php?fname=$1 [L,QSA]
RewriteRule ^blog/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#about.php
RewriteRule ^about$ "$0/" [R=301,L,QSA]
RewriteRule ^about/$ about.php [L,QSA]
RewriteRule ^about/.*?([^\.\/]*)\.html$ about.php?pname=$1 [L,QSA]
RewriteRule ^about/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ about.php?d=$1$2$3 [L,QSA]
RewriteRule ^about/[^\.]*?([^/\.]*)/$ about.php?fname=$1 [L,QSA]
RewriteRule ^about/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#404.php
RewriteRule ^404$ "$0/" [R=301,L,QSA]
RewriteRule ^404/$ 404.php [L,QSA]
RewriteRule ^404/.*?([^\.\/]*)\.html$ 404.php?pname=$1 [L,QSA]
RewriteRule ^404/([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ 404.php?d=$1$2$3 [L,QSA]
RewriteRule ^404/[^\.]*?([^/\.]*)/$ 404.php?fname=$1 [L,QSA]
RewriteRule ^404/[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]

#index.php
RewriteRule ^.*?([^\.\/]*)\.html$ ?pname=$1 [L,QSA]
RewriteRule ^([1-2]\d{3})/(?:(0[1-9]|1[0-2])/(?:(0[1-9]|1[0-9]|2[0-9]|3[0-1])/)?)?$ ?d=$1$2$3 [L,QSA]
RewriteRule ^[^\.]*?([^/\.]*)/$ ?fname=$1 [L,QSA]
RewriteRule ^\w[^\.]*?([^/\.]*)$ "$0/" [R=301,L,QSA]
</IfModule>
I solved the weird url error by modifying my links with <cms:show k_site_link />

I'm still not getting access to JS files. The page source shows them linked correctly.
It seems that some of the JS is working... but not correctly.

http://www.chrisnuzzaco.com/gallery/test/water.html

That loading div disappears properly when pretty urls is turned off....

The photography button should cause a drop down to appear - but it never does appear.

The JS only works properly on the homepage.
OK. More trouble shooting. I pulled out the gallery loading div. NO js seems to be working. None of the buttons work. If you add a "#scale" at the end of the URL it actually fires a script, not working.

Totally broken, but it's clearly linked right when I view page source!?

Weirdly enough, the about, blog, and contact pages fade it properly......

Going kinda crazy here.
Hi,

It is mentioned in the docs (and you figured out the solution correctly) - with prettyURLs you need to use absolute links for all linked resources (images, scripts, css etc.)

I had a look at the page you mentioned and it seems you've missed fixing a few of the JS links. Namely -
gallerybuttons.js
imagelightbox.js
jQuery.mScrollbar.concat.min.js
jQuery.min.js
(Chrome's developer console will show these)

Please do a search for "<script" in your source and you'll find these.
Add the <cms:show k_site_link /> to each and things should go back to normal.

Hope this helps
That was the problem, totally missed those burried script links. Thanks again!
6 posts Page 1 of 1
cron