You are here: Re: OT .htaccess « All PHP « IT news, forums, messages
Re: OT .htaccess

Posted by DrTebi on 10/13/27 11:26

On Tue, 16 Aug 2005 13:01:52 +0000, MS wrote:

> Sorry for the off topic but you guys are too helpful :)
>
> I have a .htaccess file that deciphers SEO URLs which worked fine on my old
> server.
>
> it is as follows...
>
> ----------
> AddType application/rss+xml .rss
> RewriteEngine on
> # Change "folder" to your base directory name
> RewriteBase /
> RewriteRule ^bmc-(.*)-(.*).html$ ?p=$1&id=$2
> RewriteRule ^bmc-(.*)-(.*).jpg$ ?p=$1&id=$2.jpg
> RewriteRule ^bmc-(.*).html$ ?p=$1
> ----------
>
> but since moving to my new server it no longer worked.
> I had to change the .htaccess to show full paths like this....
> RewriteRule ^bmc-(.*)-(.*).html$ http://www.mysite.co.uk?p=$1&id=$2
>
> the trouble is now that when i use a URL
> http://www.mysite.co.uk/bmc-profile.html
> the browser is redirected to http://www.mysite.co.uk?p=profile which defeats
> the object of using SEO URLs
> This also loses any post information.
>
> What i am asking is is there a setting in apache that needs to be changed to
> make the two points work
> 1. use relative links "?p=$1&id=$2"
> 2. make the browser show http://www.mysite.co.uk/bmc-profile.html but still
> able to use $_GET
>
> Thanks for your help
> AW
>
> PS. i am not an apache guru and i dont even think i have reached the novice
> status yet.

You should post this message to this newsgroup:
alt.apache.configuration

They certainly know more about RewriteRules etc.

DrTebi

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация