Jump to content

Search the Community

Showing results for tags 'clean url'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 2 results

  1. So I have the below code doing two things. The first part removing .php extension from urls and the second part redirecting from a clean url to the original. Its the second part of this that is not working and I dont know why and am hoping and praying someone here can help with this. I have tried many different tutorials with different approaches and still no luck. Below is the most basic of the attempts I have tried and from what I can tell it SHOULD work, but alas... Anyway its trying to get the clean url example.com/post/2 to redirect to example.com/post.php?id=2 Please help! RewriteEngine On #remove .php extension RewriteCond %{REQUEST_FILENAME}.php -f RewriteCond %{REQUEST_URI} !/$ RewriteRule (.*) $1\.php [L] #redirect RewriteRule ^/post/([0-9]+)$ /post.php?id=$1
  2. Hi guys, I'm new to this site so thought I'd start off with a question regarding something I've been wanting to fix for ages!! We have a custom CMS on our website that produces URLs based on the title of the news article and leaves spaces between the words. For example an article called 'News article title' creates a link like this: <a href="article.php/<?php $news->Title()?>"> Which results in the browser seeing a link like this: http://www.ourwebsite.com/article.php/news article title and once clicked turns to this in the browser: http://www.ourwebsite.com/article.php/news%20article%20title Obviously i'd prefer it to look like this: http://www.ourwebsite.com/article.php/news-article-title I have played around with .htaccess and can get it to change the gaps into dashes, but seeing as the page isn't titled with dashes the link fails... I'm guessing I need to modify my link in the PHP, but this is where my lack of experience shows!! Any advise on how I can change the above to make the URL's cleaner and more SEO friendly would be appreciated!! Simon
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.