This topic is locked

SEO friendly URLs

1/11/2017 8:56:36 AM
PHPRunner General questions
J
joshfolgado author

Hi,
I need to have SEO friendly URLs, instead of the normal URLs produced by PHPRunner.
Example of current URL for company "Flower Company":

http://DOMAIN.COM/view_companies_list.php?q=(companyID~equals~18)
Need it to be something like:

http://DOMAIN.COM/Flower%20Company
The hosting is in Apache and Linux based.
I created a ".htaccess" file on location /var/www/html.
///////
Options +FollowSymLinks

RewriteEngine On

RewriteRule "^Flower Company" "view_companies_list.php?q=%28companyID~equals~18%29"
///////
The URL rewrite works perfectly, the user just needs to enter "http://DOMAIN.COM/Flower Company and the rewrite rule displays the correct page.
The downside is that I need to enter a new entry manually to the ".htaccess" file for each new company, thus having the functionality to enter their company names and retrieve their sites directly.
This is especially important because the companies will need to add their new URL to their business cards and other literature, and using the "unfriendly" URLs simply is not an option.
What I am thinking of doing is the following:

  1. Create new table that stores all the rewrite rules for each selected object, in this example would be for all "companies".
  2. On creation of new company, the system will add a rewrite rule to this new table, to allow the building of a friendly URL for that object.
  3. When the user types that name on their browser, the rewrite file will:

    a) Connect to the database and do something like a DBLOOKUP to get the rewrite rule for that page

    <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=24405&image=1&table=forumtopics' class='bbc_emoticon' alt='B)' /> Apply the rewrite rule to allow for the friendly URL to be displayed.
    Focus is to have SEO friendly URLs that are dynamic and require little or no maintenance.
    Does anyone have experience in doing something like this? Or have better idea(s)?
    If you know of a better way and/or have the solution, can you please let me know? Your time and effort are appreciated.
    Thanks for your time

    Josh

HJB 1/11/2017

I have really NO ideas on this, but just a piece of performing code <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=81057&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />
RewriteEngine On

RewriteBase /

RewriteRule ^([a-z]+)\.html$ /index.php?$1 [R,L]

J
joshfolgado author 1/12/2017



I have really NO ideas on this, but just a piece of performing code <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=81059&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />
RewriteEngine On

RewriteBase /

RewriteRule ^([a-z]+)\.html$ /index.php?$1 [R,L]


Thanks a lot for getting back to me but it doesnt handle it, it shows the link as they were before.
Its frustrating as there is no literature on how to make the PHPRunner output SEO friendly, allow for building of friendly URLs.
The last post where someone left some idea was the one from October 2006:

http://www.asprunner.com/forums/topic/6341-mod-rewrite-for-seo-friendly-pages/
The specific project where I need to find a solution is a business directory, important to build user and SEO friendly URLs.
There must be other work produced by PHPRunner where the output sites needed to have this SEO friendly URLs, been searching but didnt find any.
All help is appreciated in finding this solution.
Take care and thanks for trying

HJB 1/12/2017

Just my 2 cents on the issue, I implemented it on my own,

Google rushed over the tables and grabbed them in full, say,

for me the shown search engine result was amazing ...
Once it did not work for you, the ReWrite on your server is either

switched off or not allowed by your provider at all.

admin 1/12/2017

Nothing really changed in this area recently so advise from 2006 is still valid. What you need to do is to implement the search by company name i.e. by making company ID a lookup wizard field. In this case you will be able to implement a single rule that will cover all companies. Here is the URL you looking for:

http://domain.com/view_companies_list.php?q=(companyName~equals~Flowers%20company)


I don't know the exact syntax for .htaccess but it can be done.

J
joshfolgado author 1/18/2017



Nothing really changed in this area recently so advise from 2006 is still valid. What you need to do is to implement the search by company name i.e. by making company ID a lookup wizard field. In this case you will be able to implement a single rule that will cover all companies. Here is the URL you looking for:

http://domain.com/view_companies_list.php?q=(companyName~equals~Flowers%20company)


I don't know the exact syntax for .htaccess but it can be done.


Hi,
Thanks for your reply.
I know the URL that I need for the url rewriting to work, that is not the issue. The issue is the url rewrite rules only handle things to some level.
If I add entries manually on the .htaccess file for a needed URL, the url rewriting works to some level. However children-pages are affected as the url rewriting adds the parent name to the URL.
Current .htaccess:
Options +FollowSymLinks

RewriteEngine On

RewriteBase /

RewriteRule ^/(.+/)?([^.][^/])$ http://%{HTTP_HOST}/$1$2/ [L,R=301]

RewriteRule ^([a-z]+)\.html$ /index.php?$1 [R,L]

RewriteRule ^companies$ view_companies_list.php [NC]

RewriteRule ^communities$ view_communities_list.php [NC]

RewriteRule ^yardsales$ view_yard_sales_list.php [NC]

RewriteRule ^events$ view_events_list.php [NC]

RewriteRule ^blog$ http://blog.lascruceslocal.com [NC]

RewriteRule ^loginnow$ login.php [NC]

RewriteRule ^fdfgdfgd view_communities_list.php?q=%28communityID~equals~17%29

RewriteRule "^Dogs Featured" "mini-about.php?company=36"

RewriteRule ^mini-about.php?company=36 "Dogs Featured"

RewriteRule "^99Company99" "mini-about.php?company=26"

RewriteRule "^ABCDEF Company" "mini-about.php?company=22"

RewriteRule "^Birds Premium" "mini-about.php?company=40"

RewriteRule ^mini-about.php?company=40$ "Birds Premium"

RewriteRule "^Test Community" "view_communities_list.php?q=%28communityID~equals~18%29"

RewriteRule "^Bird Premium Services" "mini-services.php?company=40"

RewriteRule "^Specials" "mini-specials.php"
I am not a url rewrite expert, trying to help with this issue, but would be best handled by someone with experience in doing this type of work. I have already spent over 30 hours on this issue.
Let me know how you could help, all assistance is appreciated.
Thanks

Josh

HJB 1/18/2017

I stopped reading as you told me the very same day, it did't work for you.

How can you say that? Does it mean, you want to produce eye-powder for

your own purposes, simply to squeeze some URL text somewhere? When

GOOGLE or else machine is rushing thru your pages (which can take some

days after placement of the code on the web ...) the rewrite code is

activated then which means, Google got the point of what exactly to

display later on matchword missions, row-wise content out of table. And

that's what it is all about, search engine users are typing in MATCHWORDS

in the aim to see results and WITHOUT the re-write code inside your page(s)

the tabled content would NOT form a part the search engine optimization at all.

You want to saddle the horse from the rear side, in my eyes ...

J
joshfolgado author 1/18/2017



I stopped reading as you told me the very same day, it did't work for you.

How can you say that? Does it mean, you want to produce eye-powder for

your own purposes, simply to squeeze some URL text somewhere? When

GOOGLE or else machine is rushing thru your pages (which can take some

days after placement of the code on the web ...) the rewrite code is

activated then which means, Google got the point of what exactly to

display later on matchword missions, row-wise content out of table. And

that's what it is all about, search engine users are typing in MATCHWORDS

in the aim to see results and WITHOUT the re-write code inside your page(s)

the tabled content would NOT form a part the search engine optimization at all.

You want to saddle the horse from the rear side, in my eyes ...


Can I suggest we Skype and chat face to face and explain better the issue and possible solution?
My skype is joshfolgadoskyke
I look forward to talking to you.

J
joshfolgado author 1/18/2017



I tested the solution you suggested, restarted Apache and it didnt work.
Can I suggest we Skype and chat face to face and explain better the issue and possible solution?
My skype is joshfolgadoskyke
I look forward to talking to you.

HJB 1/18/2017

Look, $750bn capital based search engine runners own automated web crawling system around the world.

They can simply afford it to own the fastest hardware to do this kind of job, yet, with all due respect,

one hard working ant seems to ignore the playing rules of the "rising robot" while it takes the web crawler

some very days until reaching your hopefully perfect rewriting code containing page, for best SEO results later on.

Yet busy ant writes to me, few minutes later after getting the code, it did not work. HOW? Of course, unless

your machine is not directly fired, real-time, by web crawler, it of course definetely CANNOT work at all as

it usually takes 4 to 7 days until you are about to SEE the SEO results, say, after the web crawler swallowed

and ignited your code on SEO issue, even a Skype based explainer chat won't help at all as you would first need

to inject the code in to page, then you drink some cups of tea over several days, keeping patience and only by

then "AWFUL" cry-out can be truly experienced, personally speaking.

J
joshfolgado author 1/18/2017

Perhaps I didnt clearly explain what needs to be done.
Most importantly is to get a page from phprunner, that instead of showing the ID, the url shows something like http://DOMAIN.com/company_name'>http://DOMAIN.com/company_name and children pages would show as http://DOMAIN.com/company name/about, etc.
I understand it takes a few days for the search engines to crawl and index the site, then yes, at that point the search engine link would reflect a more friendly url.
I had explained the focus is for companies that are using the site to be able to have a url they can use for their own purpose, for that they need a more friendly url.
Didnt get the context of your previous message, some humor about some busy bee. Can you help or not with this issue?

J
joshfolgado author 1/18/2017

Perhaps I didnt clearly explain what needs to be done.
Most importantly is to get a page from phprunner, that instead of showing the ID, the url shows something like http://DOMAIN.com/company_name'>http://DOMAIN.com/company_name and children pages would show as http://DOMAIN.com/company name/about, etc.
I understand it takes a few days for the search engines to crawl and index the site, then yes, at that point the search engine link would reflect a more friendly url.
I had explained the focus is for companies that are using the site to be able to have a url they can use for their own purpose, for that they need a more friendly url.
The client understands this work will take some time and patience, can be contacted for you to talk to him directly.
Didnt get the context of your previous message, some humor about some busy bee, dint understand the attitude.
Can you help or not with this issue?
Thanks

admin 1/18/2017

I suggest you hire someone who is familiar with URLRewrite rules. This should be a simple task for someone with expertise in this area.