Apache log output shows page ID rather than page title or meta-title

Permalink 1 user found helpful
Just a quick note that I'm loving c5. Really love it. It was a slow start since I'm older now and don't learn as quickly but am now over that hump.

I've searched around and am unable to find out how to do this, or even if it's possible ...

Here's the scenario:

Page Name = Ongoing Reflections
Page tag (forgot what it's called) = ongoing-reflections
Page ID = 213

Apache log shows "http://sitename.com/index.php?cID=213" and I want it to show "http://sitename.com/index.php/ongoing-reflections"

I've noticed the default 'About' & 'Contact" pages appear this way in the logs but not any new pages I've created.

Reason for this is 'ongoing-reflections' is meaningful in goaccess web stats whereas 'cID=213' is not - I need a second step to figure out what page ID 213 relates to.

Any ideas? I'm stumped so far.

Thanks,

Jim.

View Replies: View Best Answer
weyboat replied on at Permalink Reply
weyboat
Do you have pretty urls activated?
If not what happens when you do activate it?
jneundorf replied on at Permalink Reply
I did at one point and it seemed to break my admin login. Anyway, as I understand it, pretty URLs will hide the 'index.php' portion of the link in the log and I'm fine with that staying in place.
weyboat replied on at Permalink Reply
weyboat
what is the url of the site?
jneundorf replied on at Permalink Reply
Thank you for the help. It's drhoff.com.

I may be mis-understanding how pretty URLs work - I understood that it just removes the 'index.php' from the URL.

Anyway when I turned on pretty URLs - I had to add the recommended code the apache2 .conf file for the site, I was no longer able to log into the admin area. It was weird - I could get to the login page but was unable to gain access after entering credentials - something about not finding the page.

So I took the code out of the .conf file, restarted apache2 and was still unable to login. So I had to restore the site from backup and was back in action.
weyboat replied on at Permalink Reply
weyboat
On your home page you have created some links to your other pages which looks like this
<div class="col-sm-8">
    <h1 style="text-align: center;">Welcome to the home of Dr. Tory Hoff</h1>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php?cID=210">Psychologist in Private Practice</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php?cID=212">Dr. Hoff's Therapeutic Bibliotheca</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php?cID=224">Academic Writings</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php?cID=217">Children's Songs with Biblical Themes</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php?cID=216">Ongoing Reflections</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php?cID=213">Short Articles</a></h3>
</div>

It should look like this
<div class="col-sm-8">
    <h1 style="text-align: center;">Welcome to the home of Dr. Tory Hoff</h1>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php/private-practice">Psychologist in Private Practice</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php/dr-hoffs-therapeutic-bibliotheca">Dr. Hoff's Therapeutic Bibliotheca</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php/academic-writings">Academic Writings</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php/childrens-songs-biblical-themes">Children's Songs with Biblical Themes</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php/ongoing-reflections">Ongoing Reflections</a></h3>
<h3 style="text-align: center;"><a href="http://drhoff.com/index.php/short-articles">Short Articles</a></h3>
</div>


The pretty urls code should be added to the root/.htaccess file and not your apache2.conf file, do you have a root/.htaccess file, if so what is its contents?
weyboat replied on at Permalink Best Answer Reply
weyboat
The reason why the 'About' Contact' and 'Home' links work properly is because they are using the autonav block which will convert cID links to the proper sitemap link automatically.
jneundorf replied on at Permalink Reply
Wow, that was quick. Makes perfect sense - thanks.

I will make changes tonight and look to make pretty urls changes in .htaccess. Maybe I'll change the permissions temporarily so c5 can do it.

Thanks you, thank you, thank you.