: Mod Rewrite not working I am trying to get the URL www.example.com/blogs/<displaynamehere> to show what is in the directory at www.example.com/blogs/blog.php$display=<displaynamehere> So
I am trying to get the URL example.com/blogs/<displaynamehere> to show what is in the directory at
example.com/blogs/blog.php$display=<displaynamehere>
So thanks to the people who helped me here I know I need to use mod_rewrite
How to make parameters look more attractive
The contents of my .htaccess is as follows. The first is a redirect generated by my hosting, the second is my attempt at the mod_rewrite which is not working.
# DO NOT REMOVE THIS LINE AND THE LINES BELOW REDIRECTID:Hjz5g3
RewriteEngine on
RewriteCond %{HTTP_HOST} ^joelhoskin.net76.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.joelhoskin.net76.net$
RewriteRule ^$ www.joelhoskin.net76.net/flexdevs [R=301,L]
# DO NOT REMOVE THIS LINE AND THE LINES ABOVE Hjz5g3:REDIRECTID
RewriteEngine On
RewriteCond %{HTTP_HOST} ^joelhoskin.net76.net/blogs/(.*)$ [OR]
RewriteCond %{HTTP_HOST} ^www.joelhoskin.net76.net/blogs/(.*)$
RewriteRule ^$ www.joelhoskin.net76.net/blogs/blog.php?display= [L]
More posts by @Shanna517
1 Comments
Sorted by latest first Latest Oldest Best
The host shouldn't contain anything after the slash. So you want:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^joelhoskin.net76.net$ [OR]
RewriteCond %{HTTP_HOST} ^www.joelhoskin.net76.net$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^blogs/(.*)$ www.joelhoskin.net76.net/blogs/blog.php?display= [L]
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.