A simple permanent (301) redirect using RedirectMatch in .htaccess
Wednesday, October 7th, 2009RedirectMatch permanent /old-location/.* http://sub.domain.com
Related
RedirectMatch permanent /old-location/.* http://sub.domain.com
Related
I played with lighttpd web server on my Fedora core 10 Slice and I was getting the annoying Error 403 error while accessing a simple phpinfo file.
Solution:
Login as root
[code]
vi /etc/lighttpd/lighttpd.conf
[/code]
Enable modules:
[code]
"mod_fastcgi"
"mod_simple_vhost"
[/code]
Setup a site and creates folders if they do not exist
[code]
simple-vhost.server-root = "/var/www/vhosts/"
simple-vhost.default-host = "domain.com"
simple-vhost.document-root = "/htdocs/"
[/code]
Enable fastcgi
[code]
#### fastcgi module
## read fastcgi.txt for more info
## for PHP don't forget to set cgi.fix_pathinfo = 1 in the php.ini
fastcgi.server = ( ".php" =>
( "localhost" =>
(
"socket" => "/var/run/lighttpd/php-fastcgi.socket",
"bin-path" => "/usr/bin/php-cgi"
)
)
)
[/code]
Also look for "url.access-deny" and make sure it does not contain a .php extension.
Restart the lighttpd server
[code]
/etc/init.d/lighttpd restart
[/code]
I assume that you've already executed
Disable apache and install
[code]
service httpd stop
chkconfig httpd off
yum install lighttpd
chkconfig lighttpd on
[/code]
I recently added my RSS feeds to FeedBurner .
Here is what is worked for me.
My blog is located in /blog directory you may need to change RewriteBase if your blog is installed in another directory. Additionally you'll have to change YOUR_BLOG_ID to match your provided by FeedBurner.
In the .htaccess rules we allow FeedBurner itself to retrieve the feeds otherwise there will be an infinite loop.
[code]
RewriteEngine On
RewriteBase /blog/
# Enable FeedBurner services
RewriteCond %{HTTP_USER_AGENT} !^(FeedBurner|FeedValidator)
RewriteRule ^feed http://feeds.feedburner.com/YOUR_BLOG_ID [R=307,L]
[/code]
Related
In many cases SSL certificates are issued for the "www." domain.
Then you'll want to have all links pointing to "www." domain otherwise you'll see Firefox's error message:
"Secure Connection Failed. The certificate is only valid for www.domain.com"
[code]
RewriteEngine on
#RewriteCond %{SERVER_PORT} ^80$
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule .* https://www.domain.com%{REQUEST_URI} [QSA,R=301,L]
[/code]