Jump to content

arifKHAN

New Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About arifKHAN

  • Rank
    Newbie
  1. I have a trouble in making fancy URL's with .htaccess file. I'm saving titles in database like "name-of-a-title" but problems starts when i try to access it from URL, it don't show me a css on page only content. This URL for blog now work like http://my-website.com/blog?title=page-title and i need URL like this http://my-website.com/blog/post-title Here is mine file, i'm begginer so don't blame me please. Thanks in advance. <files .htaccess> order allow,deny deny from all </files> RewriteEngine On RewriteRule ^blog$ blog.php RewriteRule ^blog/$ blog.php RewriteRule ^blog/([^/]*)$ /blog?title=$1 [L] RewriteEngine On RewriteRule ^category/([^/]*)$ category.php?$1 [L] <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # To externally redirect /dir/abc.php to /dir/abc RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(.+?)\.php[\s?] [NC] RewriteRule ^ /%1 [R=301,L,NE] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.+?)/?$ $1.php [QSA,NC,L] </IfModule> <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^([^\.]+)$ $1.php [QSA,NC,L] </IfModule> RewriteEngine On RewriteCond %{HTTP_HOST} ^my-webiste.com RewriteRule (.*) http://www.my-website.com/$1 [R=301,L] RewriteEngine On ErrorDocument 404 /404.php
×
×
  • 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.