I need to pretify a url in movable type for tags. basically I want something like: technicae.net/tag/2-words instead of: http://www.technicae.net/cgi-bin/type/mt-search.cgi?IncludeBlogs=2&tag=2%20words&limit=20
I tried:
RewriteRule ^/tag/(.*)$ /cgi-bin/type/mt-search.cgi?IncludeBlogs=2&tag=$1&limit=100 [L,PT]
but it didn't work out as in it didn't provide results.
I was wondering if anyone can help me. My url is http://www.technicae.net
Reported on Movable Type 5

Hi Caio,
The coding that you've tried is good, with one exception.
Replace "^/tag/" with "^tag/", so that your final coding should be:
RewriteRule ^tag/(.*)$ /cgi-bin/type/mt-search.cgi?IncludeBlogs=2&tag=$1&limit=100 [L,PT]
Kind Regards,
Mihai Bocsaru
----------------------------------
Daily Movable Type Consultant
Web Development
Movable Type Consulting
Six Apart Partner
http://www.pro-it-service.com/
----------------------------------
Movable Type Demo
http://www.movabletypedemo.org/
i added it, it didn't work/provide results.
Where did you place the rewrite directives? Can you share the whole config block please?
You can also add the following directives to log what's going on and check that the logic works (they won't work if placed in a .htaccess file, only in a server or virtual host block):
RewriteLog /path/to/a/logfile
RewriteLogLevel 4
See: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewritelog
I have:
RewriteEngine On
# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^tag/(.*)$ /cgi-bin/type/mt-search.cgi?IncludeBlogs=2&tag=$1&limit=100 [L,PT]
on a shared server
That should work, as long as you're having mod_rewrite enabled.
You may like to temporary remove the block:
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
And see if the rule for the tags is working.
Tried it and nothing. How do you turn on mod_rewrite
If it is installed you turn it on with:
RewriteEngine On
To see if it is installed or not, you could create a .php file with this coding:
<?php phpinfo(); ?>
Try this code, It's working for me
Replace "^/tag/" with "^tag/", so that your final coding should be:
RewriteRule ^tag/(.*)$ /cgi-bin/type/mt-search.cgi?IncludeBlogs=2&tag=$1&limit=100 [L,PT]
Like me, nothing
RedirectMatch 301 ^/calendar-for-groups/.*$ http://www.mywebsite.com/events
Or with mod_rewrite:
RewriteRule ^calendar-for-groups/ http://www.mywebsite.com/events [R=301,L]
In my hosting there is no way to change the mod_rewrite. How can I do this?
Ask the administrator of your hosting it changes the mob rewrite
This mod_rewrite is a thorn in many people.
I have tried several times and finally I got successful. Thanks.
DocumentRoot /var/www/example.com
Alias /myapp /opt/myapp-1.2.3
RewriteEngine On
RewriteBase /myapp/
RewriteRule ^index\.html$ welcome.html
I have tried the case:
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^tag/(.*)$ /cgi-bin/type/mt-search.cgi?IncludeBlogs=2&tag=$1&limit=100 [L,PT]
RewriteCond %{HTTP_HOST} !^$
Not! use other
I have:
RewriteEngine On
# For security reasons, Option followsymlinks cannot be overridden.
# Options +FollowSymLinks
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
RewriteRule ^tag/(.*)$ /cgi-bin/type/mt-search.cgi?IncludeBlogs=2&tag=$1&limit=100 [L,PT]
on a shared server
designer iphone cases
Good information. I find this really very helpful to be honest.
Where did you place the rewrite directives? Can you share the whole config block please?
You can also add the following directives to log what's going on and check that the logic works
Social Bookmarks
This platform is increasingly simple, robust, sophisticated and nicer to work with. Congratulations to all the movable, only have to thank!
It seems too complex and very broad for me. I am looking forward for your next post. I’ll bookmark your blog and check again here frequently.
For cash strapped families, dental care can eat up a substantial portion of the household income, and many families forgo dental care in favor of more pressing dental concerns. Fortunately, there are a number of choices for patients looking to get free dental care, if you know where to look. Thanks.
bird proofing
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it.
bypass firewalls with SSL VPN
This was really a cool article. I have enjoyed this site so much. I love this tutorial. I work for a professional fit out services UK company. Thanks so much.