| | |
uppercase to lowercase url's
Please support our Search Engine Optimization advertiser: Get a Free SEO Analysis!
![]() |
•
•
Join Date: May 2006
Posts: 3
Reputation:
Solved Threads: 0
Hi all,
newbie question here...
Is there a simple solution to rewrite my urls with capital letters to all lowercase?
i.e.
www.url.com/Test.html
to
www.url.com/test.html
I'm building a directory and the url's are rewritten but keep the uppercase letters right now. I would like to change that to all lowercase.
can this be done with a mod rewrite rule? what should I add to my .htaccess file to make it work?
Thanks
DD
newbie question here...
Is there a simple solution to rewrite my urls with capital letters to all lowercase?
i.e.
www.url.com/Test.html
to
www.url.com/test.html
I'm building a directory and the url's are rewritten but keep the uppercase letters right now. I would like to change that to all lowercase.
can this be done with a mod rewrite rule? what should I add to my .htaccess file to make it work?
Thanks
DD
•
•
Join Date: Sep 2004
Posts: 89
Reputation:
Solved Threads: 1
RewriteEngine on
RewriteMap upper2lower int:tolower
RewriteRule ^/(.*)$ /${upper2lower:$1}Amnot sure if it will work or not. You can read the full post here...
http://balajin.net/blog/archives/200...convert_u.html
•
•
Join Date: May 2006
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by msaqib
Amnot sure if it will work or not. You can read the full post here...RewriteEngine on RewriteMap upper2lower int:tolower RewriteRule ^/(.*)$ /${upper2lower:$1}
http://balajin.net/blog/archives/200...convert_u.html
# Protect files
<Files ~ "^(.*)\.(inc|inc\.php|tpl|sql)$">
Order deny,allow
Deny from all
</Files>
# Protect directories
<Files ~ "^(backup|files|images|include|lang|libs(/.+)?|temp(/.+)?|templates(/.+)?|javascripts(/.+)?)$">
Order deny,allow
Deny from all
</Files>
# Disable directory browsing
Options -Indexes
# Follow symbolic links in this directory
Options +FollowSymLinks
# Override PHP settings that cannot be changed at runtime
# (If your server supports PHP settings via htaccess you can comment following two lines off)
# php_value register_globals 0
# php_value session.auto_start 0
# Customized error messages
# ( If you are running in a subfolder please add it, example: "directory/index.php?httpstatus=404" )
ErrorDocument 404 index.php?httpstatus=404
# Set the default handler
DirectoryIndex index.php
# URL rewrite rules
<IfModule mod_rewrite.c>
RewriteEngine On
## Details Link Page Rewrite##
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)fishing/link-(.*).html$ detail.php [QSA,NC]
## Pagination Rewrite
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule (.*)page-(\d+)\.html$ $1/?p=$2 [PT,NC]
## Category redirect
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>•
•
Join Date: Jul 2006
Posts: 96
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by dedoo
Hi all,
newbie question here...
Is there a simple solution to rewrite my urls with capital letters to all lowercase?
i.e.
www.url.com/Test.html
to
www.url.com/test.html
I'm building a directory and the url's are rewritten but keep the uppercase letters right now. I would like to change that to all lowercase.
can this be done with a mod rewrite rule? what should I add to my .htaccess file to make it work?
Thanks
DD
Why you want this to be done? For SEs? :!:
Aside from the SEs, my guess would be to accomidate for typos. Or ... because he used to use capital letters and now he wants to use all lowercase because it's easier to type in and such, and he doesn't want the old URLs to be broken.
•
•
Join Date: Jul 2006
Posts: 96
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by cscgal
Aside from the SEs, my guess would be to accomidate for typos. Or ... because he used to use capital letters and now he wants to use all lowercase because it's easier to type in and such, and he doesn't want the old URLs to be broken.
Both http://www.asdf.com/ASD.php and http://www.asdf.com/asd.php is equal
So no borken URLs :mrgreen: •
•
Join Date: Jun 2008
Posts: 1
Reputation:
Solved Threads: 0
•
•
•
•
RewriteEngine on RewriteMap upper2lower int:tolower RewriteRule ^/(.*)$ /${upper2lower:$1}
Amnot sure if it will work or not. You can read the full post here...
http://balajin.net/blog/archives/200...convert_u.html
You can place the code as follows in httpd.conf
<virtualhost.....
<bunch of host stuff>
RewriteEngine on
RewriteMap lowercase int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/(.*)$ /${lowercase:$1} [R=301,L]
</VirtualHost>Please check
http://httpd.apache.org/docs/1.3/mod...ml#InternalAPI
![]() |
Similar Threads
- I need help outputting the number of upper, lowercase letters digits and puctuation (Java)
- uppercase and lowercase HELP! (Java)
Other Threads in the Search Engine Optimization Forum
- Previous Thread: G sitemap error
- Next Thread: Help my site seo keywords header hijacked
| Thread Tools | Search this Thread |
activateseo? advertising airplane alexa analytics apple archive audioanalytics backlinks bing biometrics blog blogs bomb business cashback chrome codesearch company consumer corporateidentity danny design development directory engine england enterprisesearch eric_schmidt estate facebook google googlesitesearch googletrends hacking imagerecognition indexedpage india jcpenney keyword keywords kumar lens linkbuilding links marketing microsoft monetization multimediasearch news no-follow offshoreoutsourcingcompany opensource operating optimization organic pagerank plug-ins posts powerset ppc propertly ranking refresh rss search searchengine searchengineland searchengineoptimization searchengines seinfeld semanticweb seo seocompany seooptimizationindia seoservices serps sex socialnetworking space spam squidoo tools traffic tveyes tweetnews twitter uk usenet video videosearch viralmarketing web website wolfram wolframalpha wordpress yahoo yahoo! youtube






