only1wizard
asked on
how to write rewrite
How do i rewrite this url http://www.example.com/blog/index.php to read in address bar as http://blog.example.com/index.php?
thanks in advance for your help!
thanks in advance for your help!
1 # Use PHP5CGI as default$$
2 AddHandler fcgid-script .php$$
3 $$
4 DirectoryIndex index.php$$
5 $
6 Options -Indexes +FollowSymLinks$$
13 RewriteEngine on$
14 $
21 RewriteCond %{HTTP_REFERER} !^http://www.example.com/.*$ [NC]$
22 RewriteCond %{HTTP_REFERER} !^http://www.example.com/blog/$ [NC]$
23 RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ - [F,NC]$
mod_rewrite does not serve this purpose. You would need something like mod_seo (Helicon).
Or you could simply add a new name based Virtual host definition, for "blog.example.com/ to the httpd.conf, with it's DocumentRoot set to the B.../blog/ directory.
ASKER
i already have a sub domain named blog.example.com
how would the virtual host benefit me?
when this is what im trying to achieve is this.
when i go to url http://www.example.com/blogs/blogs.php?BlogId=1&FriendId=1
rewrite that url to http://blog.example.com/blogs.php?BlogId=1&FriendId=1
thanks in advance for your help!
how would the virtual host benefit me?
when this is what im trying to achieve is this.
when i go to url http://www.example.com/blogs/blogs.php?BlogId=1&FriendId=1
rewrite that url to http://blog.example.com/blogs.php?BlogId=1&FriendId=1
thanks in advance for your help!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your help!