Jump to content

Search the Community

Showing results for tags 'mod rewrite'.

  • 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. Hello, I use urls like www.example.com/viewpost.php?ID=123 where i am passing ID parameter and then display records from sql in PHP. Later with help of this forum I can able to use MOD REWRITE functionality in .htaaccess and able to convert as dynamic seo friendly url like www.example.com/mp3playerforsale www.example.com/carforsale Now I have the requirement that I have two pages which have ID as parameter. But both has to displayed in two different pages. example : mp3players should go to page viewpost.php?ID=123 cars should go to page viewpost2.php?ID=123 when i tried both displayed in viewpost.php where I need to display cars category in different pages. any help appreciated !
  2. How do you do a simple path rewrite in .htaccess? I need my localhost/blog url to access the content located in localhost/assets/blog . How do I make this rule occur in htaccess? My full .htaccess code: <IfModule mod_rewrite.c> Options +FollowSymlinks -MultiViews RewriteEngine On </IfModule> RewriteCond %{HTTP_HOST} ^www.mysite.com$ [NC] RewriteRule ^(.*)$ http://mysite.com/$1 [R=301,L,S=4] # If requested resource exists as a file or directory, skip next three rules RewriteCond %{DOCUMENT_ROOT}/$1 -f [OR] RewriteCond %{DOCUMENT_ROOT}/$1 -d RewriteRule (.*) - [S=3] # Blog articles. # RewriteCond %{REQUEST_FILENAME} !-f # RewriteCond %{REQUEST_FILENAME} !-d # RewriteRule ^/?blog/([^/]+)/(\d+)/(\d+)$ blog.php?title=$1&id=$2&reply_to=$3 [L,S=1] # RewriteCond %{REQUEST_FILENAME} !-f # RewriteCond %{REQUEST_FILENAME} !-d # RewriteRule ^/?blog/([^/]+)/(\d+)$ blog.php?title=$1&id=$2 [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(blog/.*)$ /assets/$1 [L,NC] # Remove the .php extension RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] # for copying #RewriteCond %{REQUEST_FILENAME} !-f #RewriteCond %{REQUEST_FILENAME} !-d #RewriteRule ^(.*)$ index.php?page=$1 [L] RewriteRule (.*)\.xml(.*) $1.php$2 [nocase] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ app.php?tag=$1 [QSA,L] # ---------------------------------------------------------------------- # Custom 404 page # ---------------------------------------------------------------------- # You can add custom pages to handle 500 or 403 pretty easily, if you like. ErrorDocument 403 /error.php?type=403 ErrorDocument 404 /error.php?type=404 ErrorDocument 500 /error.php?type=500
×
×
  • 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.