Problems, need help? Have a tip or advice? Post it here.
3 posts Page 1 of 1
Hi Guys
I'm having an issue with Pretty Urls

Testing site on local host:
when Pretty urls are enabled it rewrites the url from
http://localhost/sitename/something.php
to
http://localhost/sitemane/something/

This new url returns a 404 everytime.

The index.php get rewritten and takes me back to http://localhost/xampp/

I've tried setting the absolute url path in config.php to
http://localhost/sitename/
and I have tried it with the absolute url commented out - both return same result.
I have used the gen_htaccess.php to create the required .htaccess

I have also tried this on the live server and while it re-writes the urls and actually shows the page, all images, linked CSS file styles etc are missing.

EDIT:
Forgot to mention, when trying it on live server the rewritten urls were adding the target url to the url instead of changing it:
http://mysite.com/im-on-this-page/

I click link for http://mysite.com/that-page/
url changes to
http://mysite.com/im-on-this-page/that-page/



Thanks


webecho
Hi,

For the localhost installation, since your Couch managed website is running off a sub-folder, are you sure you edited the following line within the generated .htaccess and added your sub-folder to it?
Code: Select all
#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 /your_sub_folder

As for the live site, could you please send me a link to it (with the problem URLs testable)?

Thanks
webecho wrote: I have also tried this on the live server and while it re-writes the urls and actually shows the page, all images, linked CSS file styles etc are missing.

For anyone else in the future who may experience this, the problem could be caused by the manner in which one specifies the location of images or any other files in your coding. Once pretty urls is enabled, it can cause problems if files are not linked with respect to the root. For example:

Incorrect:
Code: Select all
<img src="banner.png" width="300" height="60" alt="banner">

Correct:
Code: Select all
<img src="/banner.png" width="300" height="60" alt="banner">
3 posts Page 1 of 1
cron