Site setup HELP

Site setup HELP

Posted by: _mr_bones
Posted on: 2008-11-01 16:29:00

Hi,

I am having a problem setting up my site.
It works perfect on my local but htaccess is doing nothing for me.

Here is my config:

windows xp / Apache / php / MySql
httpd.conf

**** Showing only what is Relevant *****

<VirtualHost 127.0.0.1>
ServerAdmin webmaster@site1
DocumentRoot "C:/Projects/root/site/site2"
ServerName site2.com:80
ServerAlias *.site2.com
ErrorLog logs/error.log
#ScriptAlias /cgi-bin/ "C:/Projects/root/cgi-bin/"

<Directory "C:/Projects/root/site/site2">
Options FollowSymLinks
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>


Alias /classes/ "C:/Projects/root/classes/"

<directory "C:/Projects/root/classes/">
#DirectoryIndex default.htm
AllowOverride All
Order allow,deny
Allow from all
</directory>

php_value auto_prepend_file "C:\Projects\root\app.php"

RewriteEngine On



RewriteRule ^/([a-z]{2})/com/(.*)-(.*)-(.*)/(.*)-(.*)/$ /?lang=$1&com=$2$3$4¶m=$5-$6 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)-(.*)/(.*)-(.*)/$ /?lang=$1&com=$2$3¶m=$4-$5 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)/(.*)-(.*)/$ /?lang=$1&com=$2¶m=$3-$4 [PT]


RewriteRule ^/([a-z]{2})/com/(.*)-(.*)-(.*)/(.*)/$ /?lang=$1&com=$2$3$4¶m=$5 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)-(.*)/(.*)/$ /?lang=$1&com=$2$3¶m=$4 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)/(.*)/$ /?lang=$1&com=$2¶m=$3 [PT]

RewriteRule ^/([a-z]{2})/com/(.*)-(.*)-(.*)/$ /?lang=$1&com=$2$3$4 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)-(.*)/$ /?lang=$1&com=$2$3 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)/$ /?lang=$1&com=$2 [PT]


RewriteRule ^/([a-z]{2})/com/(.*)-(.*)-(.*)/(.*)-(.*)$ /?lang=$1&com=$2$3$4¶m=$5-$6 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)-(.*)/(.*)-(.*)$ /?lang=$1&com=$2$3¶m=$4-$5 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)/(.*)-(.*)$ /?lang=$1&com=$2¶m=$3-$4 [PT]


RewriteRule ^/([a-z]{2})/com/(.*)-(.*)-(.*)/(.*)$ /?lang=$1&com=$2$3$4¶m=$5 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)-(.*)/(.*)$ /?lang=$1&com=$2$3¶m=$4 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)/(.*)$ /?lang=$1&com=$2¶m=$3 [PT]

RewriteRule ^/([a-z]{2})/com/(.*)-(.*)-(.*)$ /?lang=$1&com=$2$3$4 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)-(.*)$ /?lang=$1&com=$2$3 [PT]
RewriteRule ^/([a-z]{2})/com/(.*)$ /?lang=$1&com=$2 [PT]

RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)-(.*)-(.*)-(.*)/$ /?lang=$1&page=$2$3$4$5$6$7 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)-(.*)-(.*)/$ /?lang=$1&page=$2$3$4$5$6 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)-(.*)/$ /?lang=$1&page=$2$3$4$5 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)/$ /?lang=$1&page=$2$3$4 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)/$ /?lang=$1&page=$2$3 [PT]
RewriteRule ^/([a-z]{2})/(.*)/$ /?lang=$1&page=$2 [PT]

RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)-(.*)-(.*)-(.*)$ /?lang=$1&page=$2$3$4$5$6$7 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)-(.*)-(.*)$ /?lang=$1&page=$2$3$4$5$6 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)-(.*)$ /?lang=$1&page=$2$3$4$5 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)-(.*)$ /?lang=$1&page=$2$3$4 [PT]
RewriteRule ^/([a-z]{2})/(.*)-(.*)$ /?lang=$1&page=$2$3 [PT]
RewriteRule ^/([a-z]{2})/(.*)$ /?lang=$1&page=$2 [PT]

</VirtualHost>


Can someone please point me to the right direction. I need to go live with this site this weekend and I AM COMPLETELY LOST :(

Thanks
















Re: Site setup HELP

Posted by: sdayman
Posted on: 2008-11-01 16:39:00

Is this for a site hosted here? There shouldn't be anything about Virtual Hosts here, and there's no C:/ here for your data.

-Scott

Re: Site setup HELP

Posted by: _mr_bones
Posted on: 2008-11-01 16:42:00

Hi Scott,

this is what I have on my local.

On the .htaccess file that I am playing with now I have no C: or Virtual Hosts.

Do you think you could guide me on this one?

Thanks

Re: Site setup HELP

Posted by: _mr_bones
Posted on: 2008-11-01 16:46:00

Just to complete the last post.

What I need here is the Alias, rewrite and prepend a file to work.

The rewrite should work like this:

url.com/en/bla/

Translates to
url.com/index.php?lang=en¶m=bla




Alias /classes/ "/root/classes/"

<directory "C:/Projects/root/classes/">
#DirectoryIndex default.htm
AllowOverride All
Order allow,deny
Allow from all
</directory>

php_value auto_prepend_file "\root\app.php"

RewriteEngine On



RewriteRule ^/([a-z]{2})/com/(.*)-(.*)-(.*)/(.*)-(.*)/$ /?lang=$1&com=$2$3$4¶m=$5-$6 [PT]

Re: Site setup HELP

Posted by: _mr_bones
Posted on: 2008-11-01 20:46:00

Ok,

Prepend and rewrite I figured out. Now If any good soul could explain to me how to have Alias directories/Virtual directories!!! Please!!!

I will post the solutions here as soon as I figure out the Alias.

Thanks

Tags: apache php mysqlhttpdwindows xp