Webmaster Forum
Go Back   Webmaster Forums UK SEO SEM Webmaster Community Forum - UKWW > Website Traffic and Marketing > General Search Engine Discussions
Register FAQ Members List Downloads Calendar Today's Posts Webmaster Resources Webmaster Blogs

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-30-2008, 12:48 PM
Member
 
Join Date: Mar 2008
Posts: 39
iTrader: 0 / 0%
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
djpassion is on a distinguished road
Default redirect extention with 301

how do i 301 this rule

RewriteRule contact.html contact.php

i have the above rewriterule in .htaccess and now the below url can be accessed

http://www.djpassions.com/contact.html

but how do i get contact.php to redirect to contact.html? so if someone goes to http://www.djpassions.com/contact.php will be redirected to http://www.djpassions.com/contact.html

ive checked loads of docs on the net about this but none of the suggestions work
__________________
DJ Community
DJ Forums
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-30-2008, 02:03 PM
Junior Member
 
Join Date: Apr 2008
Posts: 29
iTrader: 0 / 0%
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
ohsuria is on a distinguished road
Default

Hi djpassion,
it's not rewrite rule but it redirect the page using 301.

Redirect 301 /contact.php http://www.djpassions.com/contact.html

Last edited by ohsuria; 04-30-2008 at 02:06 PM.
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 04-30-2008, 02:10 PM
Member
 
Join Date: Apr 2008
Posts: 35
iTrader: 0 / 0%
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
itconstruct is on a distinguished road
Default

if you use cpanel to administer your website you can create a redirect from within cpanel quickly and easily!

If you are unsure let me take a look.
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-30-2008, 03:29 PM
Member
 
Join Date: Mar 2008
Posts: 39
iTrader: 0 / 0%
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
djpassion is on a distinguished road
Default

Im using e107 cms with the furl plugin so think thats why the page rewrite isnt working

When i try Redirect 301 /contact.php http://www.djpassions.com/contact.html

I just get page /contact.html not found so think its something to do with static/dynamic

I have a redirect section in cpanel too but that doesnt work either

Last edited by djpassion; 04-30-2008 at 03:32 PM.
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-30-2008, 03:40 PM
Member
 
Join Date: Apr 2008
Posts: 42
iTrader: 0 / 0%
Thanks: 1
Thanked 1 Time in 1 Post
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
eugen is on a distinguished road
Default

Try:

Code:
RewriteRule ^contact\.html$ contact.php [L]
Or .. for each file:
Code:
RewriteRule ^(.*)\.html$ $1.php [L]
__________________
+ read about passive smoking facts
+ directory reviewer
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 04-30-2008, 03:50 PM
Member
 
Join Date: Mar 2008
Posts: 39
iTrader: 0 / 0%
Thanks: 0
Thanked 0 Times in 0 Posts
Nominated 0 Times in 0 Posts
TOTW/F/M Award(s): 0
djpassion is on a distinguished road
Default

Quote:
Originally Posted by eugen View Post
Try:

Code:
RewriteRule ^contact\.html$ contact.php [L]
Or .. for each file:
Code:
RewriteRule ^(.*)\.html$ $1.php [L]
that didnt work either

in .htaccess i have this

Quote:
# Use PHP5CGI as default
#AddHandler fcgid-script.php
#FCGIWrapper /usr/local/cpanel/cgi-sys/fcgiwrapper.php
Options All -Indexes
Options +FollowSymLinks
RewriteEngine On

RewriteCond %{HTTP_HOST} !^www\.djpassions\.com
RewriteRule (.*) http://www.djpassions.com/$1 [R=301,L]

RewriteCond %{HTTP_HOST} ^djpassions.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.djpassions.com$
RewriteRule ^news.php$ http://www.djpassions.com [R=301,L]

RewriteBase /

RewriteRule themes.html$ themes.php
RewriteRule themes([0-9]*)\.html(.*) themes.php?start=$1
RewriteRule themes-([0-9]*)\.html(.*) news.php?themepreview.$1
#RewriteRule download/(.+)/$ createzip/download.php?theme=$1

# ===============================================
# NEWS ==========================================
RewriteRule news.html$ news.php
RewriteRule news([0-9]*)-([0-9]*)\.html(.*)$ news.php?$1.$2
RewriteRule news([0-9]*)-([0-9]*)-([0-9]*)\.html(.*)$ news.php?$1.$2.$3
RewriteRule news-i([0-9]*)-([0-9]*)\.html(.*)$ news.php?item.$1.$2
RewriteRule news([0-9]*)\.html(.*)$ news.php?extend.$1
RewriteRule news-c([0-9]*)\.html(.*)$ news.php?cat.$1
RewriteRule news-c([0-9]*)-([0-9]*)\.html(.*)$ news.php?cat.$1.$2

# ==============================================
# DOWNLOADS ====================================
RewriteRule download.html$ download.php
RewriteRule downloads([0-9]*)\.html(.*)$ download.php?view.$1
RewriteRule download([0-9]*)\.html(.*)$ download.php?list.$1
RewriteRule downloads([0-9]*)$ download.php?view.$1
RewriteRule download([0-9]*)$ download.php?list.$1
RewriteRule request([0-9]*)\.html(.*)$ request.php?$1

# ==============================================
# PAGE.PHP =====================================
RewriteRule page.html page.php
RewriteRule page([0-9]*)\.html(.*)$ page.php?$1

#==============================================
# USER.PHP ====================================
RewriteRule user.html user.php
RewriteRule user([0-9]*)\.html(.*)$ user.php?id.$1

# =============================================
# SUBMITNEWS.PHP ==============================
RewriteRule submitnews.html submitnews.php

# =============================================
# CONTACT.PHP =================================
RewriteRule contact.html contact.php

# =============================================
# UPLOAD.PHP =================================
RewriteRule upload.html upload.php

# =============================================
# SEARCH.PHP =================================
RewriteRule search.html search.php

# =============================================
# SIGNUP.PHP =================================
RewriteRule signup.html signup.php

# =============================================
# SCHEDULE.PHP =================================
#RewriteRule schedule.html plugins/djschedule/djschedule_page.php
#RewriteRule plugins/djschedule/profile.php profile.php

# =============================================
# CHATROOM.PHP =================================
#RewriteRule chat.html plugins/phpfreechat_menu/index.php

# =============================================
# DONATE.PHP =================================
RewriteRule donate.html page.php?4

# =============================================
# APPLY.PHP =================================
RewriteRule apply.html plugins/apply/apply.php?1

# =============================================
# FAQ.PHP =================================
#RewriteRule faq.html plugins/faq/faq.php

# =============================================
# SUBMITLINK.PHP =================================
#RewriteRule submit_link.html plugins/links_page/links.php?submit

# =============================================
# COMMENTS ====================================
RewriteRule comment-n([0-9]*)\.html(.*)$ comment.php?comment.news.$1
RewriteRule reply-n([0-9]*)-([0-9]*)\.html(.*)$ comment.php?reply.news.$1.$2
RewriteRule reply-d([0-9]*)-([0-9]*)\.html(.*)$ comment.php?reply.download.$1.$2

# =============================================
# LINKS PAGE PLUGIN ===========================
RewriteRule links.html plugins/links_page/links.php
RewriteRule links([0-9]*)\.html(.*)$ plugins/links_page/links.php?view.$1
RewriteRule links-([0-9]*)\.html(.*)$ plugins/links_page/links.php?cat.$1

# =============================================
# CONTENT PLUGIN ==============================
RewriteRule content.html plugins/content/content.php
RewriteRule content([0-9]*)\.html(.*)$ plugins/content/content.php?content.$1
RewriteRule content-([0-9]*)\.html(.*)$ plugins/content/content.php?recent.$1

# =============================================
# STATS PLUGIN ================================
RewriteRule stats.html plugins/log/stats.php
RewriteRule stats([0-9]*)\.html(.*)$ plugins/log/stats.php?$1

# =============================================
# PAGE.PHP ====================================
RewriteRule page/$ page.php
RewriteRule page/([0-9]+)/$ page.php?$1

# =============================================
# FORUM PLUGIN ================================
RewriteRule forum.html plugins/forum/forum.php
RewriteRule forum([0-9]*)\.html(.*)$ plugins/forum/forum_viewforum.php?$1
RewriteRule forum([0-9]*)-([0-9]*)\.html(.*)$ plugins/forum/forum_viewforum.php?$1.$2
RewriteRule forum-t([0-9]*)\.html(.*)$ plugins/forum/forum_viewtopic.php?$1
RewriteRule forum-t([0-9]*)-([0-9]*)\.html(.*)$ plugins/forum/forum_viewtopic.php?$1.$2
RewriteRule forum-t([0-9]*)-([0-9]*)-next\.html(.*)$ plugins/forum/forum_viewtopic.php?$1.$2.next
RewriteRule forum-t([0-9]*)-([0-9]*)-prev\.html(.*)$ plugins/forum/forum_viewtopic.php?$1.$2.prev
RewriteRule forum-t([0-9]*)-last\.html(.*)$ plugins/forum/forum_viewtopic.php?$1.last
RewriteRule forum-t([0-9]*)-([0-9]*)-track\.html(.*)$ plugins/forum/forum_viewtopic.php?$1.$2.track
RewriteRule forum-t([0-9]*)-([0-9]*)-untrack\.html(.*)$ plugins/forum/forum_viewtopic.php?$1.$2.untrack
RewriteRule forum-r([0-9]*)\.html(.*)$ plugins/forum/forum_post.php?rp.$1
RewriteRule forum-p([0-9]*)\.html(.*)$ plugins/forum/forum_post.php?nt.$1
RewriteRule forum-e([0-9]*)\.html(.*)$ plugins/forum/forum_post.php?edit.$1
RewriteRule forum-t([0-9]*)-report\.html(.*)$ plugins/forum/forum_viewtopic.php?$1..report
RewriteRule forum-q([0-9]*)\.html(.*)$ plugins/forum/forum_post.php?quote.$1
RewriteRule top-poster-([0-9]*)-([0-9]*)\.html(.*)$ top.php?$1.top.forum.$2
RewriteRule top-active([0-9]*)\.html(.*)$ top.php?$1.active
RewriteRule top-active-([0-9]*)-([0-9]*)\.html(.*)$ top.php?$1.active.forum.$2

# =============================================
# KIG Plugin -- this does not work yet..
RewriteRule gallery.html plugins/kig_menu/index.php
RewriteRule album([0-9]*)\.html(.*)$ plugins/kig_menu/index.php?view=album&albumId=$1
RewriteRule image([0-9]*)\.html(.*)$ plugins/kig_menu/index.php?view=image&imageId=$1

# =============================================
# GUESTBOOK PLUGIN ============================
RewriteRule guestbook\.html(.*)$ plugins/guestbook/index.php

# =============================================
# PM PLUGIN ===================================
RewriteRule pm([0-9]*)\.html(.*)$ plugins/pm/pm.php?send.$1

AddType video/x-ms-asf asf asx
AddType audio/x-scpls pls
AddType audio/x-pn-realaudio ram
__________________
DJ Community
DJ Forums

Last edited by djpassion; 04-30-2008 at 03:53 PM.
Digg this Post!Add Post to del.icio.usStumble this Post!Wong this Post!
Reply With Quote
Reply

Bookmarks

Webmaster Resources
UK WW SEO Tools
Find UK Hosts
 
The Forum Rules
Forum Rules - MUST READ
 
Site Of the Month
BizzFace
Nominate site of the month
 
Tag Cloud
a75-s229 laptop ac adapter apple ipod nano 4gb brand new cellphone digital camera dj mixer domains drupal earphones ecommerce edible oil electronics estdomains forum for webmasters free web space hosting hosting offer low cost iphone iphone 3g 16gb iphones laptops mdj's mobile phones motorola rokr e6 newbie new pioneercdj's nokia oil phones phpld plasma tv poineer prepaid phone card prepaid phone cards promo proxy renew seo social web hosting telecom links template design transfer usb cable web hosting

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump



All times are GMT. The time now is 10:31 AM.

UK Webmaster World Forums - Internet marketing, web development, domain names, SEO contest and discussuons.
Subscribe to our feeds   Subscribe to our feeds

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151