Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. Intermediate & Advanced SEO
    4. How to make SEF URL for PHP/MySQL web site

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    How to make SEF URL for PHP/MySQL web site

    Intermediate & Advanced SEO
    4
    4
    5733
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • kolio_kolev
      kolio_kolev last edited by

      Hi mozzers!

      I'm fairly new to SEO topic, but I'm learning fast because all of you, so please take my warm thanks first!

      The problem: I have a web site based on PHP/MySQL that has no SEF addresses, it's made by unknown CMS, so I cannot use any extensions or modules, I have to write my own SEF extension.

      The question: Would you suggest me, please an article or idea, what I need to make my URLs search engine friendly? What's best to use: .htaccess or something else?

      This is the aforementioned web site: www.nortrak.bg

      Thanks a lot,

      Kolio

      1 Reply Last reply Reply Quote 0
      • rankmenow
        rankmenow last edited by

        Hello Everyone,

        I'm new here and just getting back into SEO (a little bit) after not doing anything 'myself' for a couple of years.  My question is along the same subject.  Currently my individual URLs show as: https://www.example.com/index.php?l=product_detail&p=107 (dynamic responsive site).

        I can switch it to a static site, so the individual product pages read as:https://www.example.com/catalog/category name/product name-107.html

        It's still a long URL, but it would be keyword rich.  Some of my current dynamic pages are indexed,and due to an upgrade I had to do several months back, I already have some redirects (301) from my php extensions to the one listed above.  This is my long explanation to my following questions:

        1. Does having a dynamic or static site matter when ranking in search engines

        2. I already have some redirects coming my older site to this dynamic site, so I would have to make more directs from the dynamic site to my static site - is this okay to do?

        I'm really at a loss, a couple of years ago, I ranked 1-3 (on Page 1) on Google for all my keywords, (all White Hat work), and now I'm into great abyss of no mans land of the internet (ranked on Page 3+)

        Thank you for any and all help from everyone!

        ~Sandra

        1 Reply Last reply Reply Quote 0
        • kolio_kolev
          kolio_kolev @saibose last edited by

          Thank you Saibose!

          What to do with old URLs that are already in SERP should I make redirection rules separately? I've found two more articles, that clarifies the SEF-topic:

          Explanation of the problem and a tool for generating .htaccess rules

          Two solutions - PHP/MySQL based and .htaccess based

          1 Reply Last reply Reply Quote 0
          • saibose
            saibose last edited by

            I would suggest that depending on the number of pages, you can either do a htaccess based redirection or an apache mod redirect.

            Here is an article which could help you.

            http://httpd.apache.org/docs/current/mod/mod_rewrite.html

            kolio_kolev 1 Reply Last reply Reply Quote 1
            • 1 / 1
            • First post
              Last post

            Got a burning SEO question?

            Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


            Start my free trial


            Browse Questions

            Explore more categories

            • Moz Tools

              Chat with the community about the Moz tools.

            • SEO Tactics

              Discuss the SEO process with fellow marketers

            • Community

              Discuss industry events, jobs, and news!

            • Digital Marketing

              Chat about tactics outside of SEO

            • Research & Trends

              Dive into research and trends in the search industry.

            • Support

              Connect on product support and feature requests.

            • See all categories

            Related Questions

            • alex_goldman

              All URLs in the site is 302 redirected to itself

              Hi everyone, I have a problem with a website wherein all URLs (homepage, inner pages) are 302 redirected. This is based on Screaming Frog crawl. But the weird thing is that they are 302 redirected to themselves which doesn't make any sense. Example:
              https://www.example.com.au/ is 302 redirected to https://www.example.com.au/ https://www.example.com.au/shop is 302 redirected to https://www.example.com.au/shop https://www.example.com.au/shop/dresses is 302 redirected to https://www.example.com.au/shop/dresses Have you encountered this issue? What did you do to fix it? Would be very glad to hear your responses. Cheers!

              Intermediate & Advanced SEO | | alex_goldman
              0
            • NickG-123

              Site-wide Canonical Rewrite Rule for Multiple Currency URL Parameters?

              Hi Guys, I am currently working with an eCommerce site which has site-wide duplicate content caused by currency URL parameter variations. Example: https://www.marcb.com/ https://www.marcb.com/?setCurrencyId=3 https://www.marcb.com/?setCurrencyId=2 https://www.marcb.com/?setCurrencyId=1 My initial thought is to create a bunch of canonical tags which will pass on link equity to the core URL version. However I was wondering if there was a rule which could be implemented within the .htaccess file that will make the canonical site-wide without being so labour intensive. I also noticed that these URLs are being indexed in Google, so would it be worth setting a site-wide noindex to these variations also? Thanks

              Intermediate & Advanced SEO | | NickG-123
              0
            • CostumeD

              On 1 of our sites we have our Company name in the H1 on our other site we have the page title in our H1 - does anyone have any advise about the best information to have in the H1, H2 and Page Tile

              We have 2 sites that have been set up slightly differently. On 1 site we have the Company name in the H1 and the product name in the page title and H2. On the other site we have the Product name in the H1 and no H2. Does anyone have any advise about the best information to have in the H1 and H2

              Intermediate & Advanced SEO | | CostumeD
              0
            • Jay328

              Weird 404 URL Problem - domain name being placed at end of urls

              Hey there. For some reason when doing crawl tests I'm finding pages with the domain name being tacked on the end and causing 404 errors. 
              For example:  http://domainname.com/page-name/http://domainname.com This is happening to all pages, posts and even category type 1. Site is in Wordpress
              2. Using Yoast SEO plugin Any suggestions? Thanks!

              Intermediate & Advanced SEO | | Jay328
              0
            • Travis-W

              Ending URLs in .html versus /

              Hi there! Currently all the URLs on my website, even the home page, end it .html, such as http://www,consumerbase.com/index.html Is this bad?
              Is there any benefit to this? Should I remove it and just have them end with a forward slash?
              If I 301 redirect the old .html URLs to the forward slash URLs, will I lose PA? Thanks!

              Intermediate & Advanced SEO | | Travis-W
              0
            • IHSwebsite

              Robots.txt: Can you put a /* wildcard in the middle of a URL?

              We have noticed that Google is indexing the language/country directory versions of directories we have disallowed in our robots.txt. For example: Disallow: /images/ is blocked just fine However, once you add our /en/uk/ directory in front of it, there are dozens of pages indexed. The question is: Can I put a wildcard in the middle of the string, ex. /en/*/images/, or do I need to list out every single country for every language in the robots file. Anyone know of any workarounds?

              Intermediate & Advanced SEO | | IHSwebsite
              0
            • WSOT

              How get rid of duplicate content, titles, etc on php cartweaver site?

              my website http://www.bartramgallery.com was created using php and cartweaver  2.0 about five years ago by a web developer.  I was really happy with the results of the design was inspired to get into web development and have been studying ever since.  My biggest problem at this time is that I am not knowledgable with php and the cartweaver product but am learning as I read more.  The issue is that seomoz tools are reporting tons of duplicate content and duplicate title pages etc.  This is likely from the dynamic urls and same pages with secondary results etc.  I just made a new sitemap with auditmypc I think it was called in an attempt to get rid of all the duplicate page titles but is that going to solve anything or do I need to find another way to configure the site?  There are many pages with the same content competing for page rank and it is a bit frustrating to say the least.  If anyone has any advice it would be greatly appreciated even pointing me in the right direction. Thank you, Jesse

              Intermediate & Advanced SEO | | WSOT
              0
            • STPseo

              Best approach to launch a new site with new urls - same domain

              www.sierratradingpost.com We have a high volume e-commerce website with over 15K items, an average of 150K visits per day and 12.6 pages per visit. We are launching a new website this spring which is currently on a beta sub domain and we are looking for the best strategy that preserves our current search rankings while throttling traffic (possibly 25% per week) to measure results. The new site will be soft launched as we plan to slowly migrate traffic to it via a load balancer. This way we can monitor performance of the new site while still having the old site as a backup. Only when we are fully comfortable with the new site will we submit the 301 redirects and migrate everyone over to the new site. We will have a month or so of running both sites. Except for the homepage the URL structure for the new site is different than the old site. What is our best strategy so we don’t lose ranking on the old site and start earning ranking on the new site, while avoiding duplicate content and cloaking issues? Here is what we got back from a Google post which may highlight our concerns better: http://www.google.com/support/forum/p/Webmasters/thread?tid=62d0a16c4702a17d&hl=en&fid=62d0a16c4702a17d00049b67b51500a6 Thank You, sincerely, Stephan Woo Cude SEO Specialist scude@sierratradingpost.com

              Intermediate & Advanced SEO | | STPseo
              0

            Get started with Moz Pro!

            Unlock the power of advanced SEO tools and data-driven insights.

            Start my free trial
            Products
            • Moz Pro
            • Moz Local
            • Moz API
            • Moz Data
            • STAT
            • Product Updates
            Moz Solutions
            • SMB Solutions
            • Agency Solutions
            • Enterprise Solutions
            Free SEO Tools
            • Domain Authority Checker
            • Link Explorer
            • Keyword Explorer
            • Competitive Research
            • Brand Authority Checker
            • Local Citation Checker
            • MozBar Extension
            • MozCast
            Resources
            • Blog
            • SEO Learning Center
            • Help Hub
            • Beginner's Guide to SEO
            • How-to Guides
            • Moz Academy
            • API Docs
            About Moz
            • About
            • Team
            • Careers
            • Contact
            Why Moz
            • Case Studies
            • Testimonials
            Get Involved
            • Become an Affiliate
            • MozCon
            • Webinars
            • Practical Marketer Series
            • MozPod
            Connect with us

            Contact the Help team

            Join our newsletter

            Access all your tools in one place. Whether you're tracking progress or analyzing data, everything you need is at your fingertips.

            Moz logo
            © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
            • Accessibility
            • Terms of Use
            • Privacy

            Looks like your connection to Moz was lost, please wait while we try to reconnect.