arifKHAN Posted May 2, 2017 Share Posted May 2, 2017 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,denydeny from all</files>RewriteEngine OnRewriteRule ^blog$ blog.phpRewriteRule ^blog/$ blog.phpRewriteRule ^blog/([^/]*)$ /blog?title=$1 [L]RewriteEngine OnRewriteRule ^category/([^/]*)$ category.php?$1 [L]<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /# To externally redirect /dir/abc.php to /dir/abcRewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/+(.+?)\.php[\s?] [NC]RewriteRule ^ /%1 [R=301,L,NE]RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}.php -fRewriteRule ^(.+?)/?$ $1.php [QSA,NC,L]</IfModule><IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-dRewriteCond %{REQUEST_FILENAME}.php -fRewriteRule ^([^\.]+)$ $1.php [QSA,NC,L]</IfModule>RewriteEngine OnRewriteCond %{HTTP_HOST} ^my-webiste.comRewriteRule (.*) http://www.my-website.com/$1 [R=301,L] RewriteEngine OnErrorDocument 404 /404.php Quote Link to comment https://forums.phpfreaks.com/topic/303846-re-writing-url-with-htaccess-dont-works-with-multiple-re-writes-dynamic/ Share on other sites More sharing options...
arifKHAN Posted May 2, 2017 Author Share Posted May 2, 2017 Please give me out of here this problem and save my job Quote Link to comment https://forums.phpfreaks.com/topic/303846-re-writing-url-with-htaccess-dont-works-with-multiple-re-writes-dynamic/#findComment-1546065 Share on other sites More sharing options...
ginerjm Posted May 2, 2017 Share Posted May 2, 2017 (edited) Maybe try posting in another forum. You are not asking a PHP question. Tip. Always remember that your 'crisis' is no one's but your own. Edited May 2, 2017 by ginerjm Quote Link to comment https://forums.phpfreaks.com/topic/303846-re-writing-url-with-htaccess-dont-works-with-multiple-re-writes-dynamic/#findComment-1546074 Share on other sites More sharing options...
JackN Posted May 3, 2017 Share Posted May 3, 2017 Try to post your question on http://stackoverflow.com/questions Also, I am sure that you can find your solution by looking other's question about htacess files on stackoverflow, it is a perfect source of information Quote Link to comment https://forums.phpfreaks.com/topic/303846-re-writing-url-with-htaccess-dont-works-with-multiple-re-writes-dynamic/#findComment-1546126 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.