Jump to content

Search the Community

Showing results for tags 'slashes'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • 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


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Donation Link

Found 1 result

  1. Hello PHPFreaks Been a long time since i've been here last time! (hopefully it means that i'm getting better However! I'm playing around with "new" technology the mod_rewrite for the .htaccess file. I'm writting a php app where the url has 2 parameters. example.com?path=this/is/a/path/to/this/&slug=page NOW my dilemma is that my .htaccess rules work IF there is NO / (slash) in the ?path= var (since I separate the 2 vars at a /). my question is now! (bear in mind here that i'm a ROOKIE at .htaccess rewriting) how do i go about in the .htaccess file to make it reconize that whatever comes after the last slash the $2 variable and everything is $1 - even if there is no $path defined in the url? BTW! I'm not looking for free handouts and do my coding here! I'm willing to learn here but just need pointers!! I've pasted my .htaccess file here: Options +FollowSymlinks RewriteEngine On RewriteCond %{REQUEST_URI} !=/index.php RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)/([^/.]+)$ /index.php?slug=$1&type=$2&view=$3&action=$4 [L,PT] RewriteRule ^([^/.]+)/([^/.]+)/([^/.]+)$ /index.php?slug=$1&type=$2&view=$3 [L,PT] RewriteRule ^([^/.]+)/([^/.]+)$ /index.php?path=$1&slug=$2 [L,PT] RewriteRule ^([^/.]+)$ /index.php?slug=$1 [L,PT] RewriteRule ^(.+)/$ /$1 [R=301,L] Thanks in advance
  • 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.