Site setup HELP


#1

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

Alias /classes/ “C:/Projects/root/classes/”

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

php_value auto_prepend_file “C:\Projects\root\app.php”

RewriteEngine On

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

RewriteRule ^/([a-z]{2})/com/(.)-(.)-(.)/(.)/$ /?lang=$1&com=$2$3$4&param=$5 [PT]
RewriteRule ^/([a-z]{2})/com/(.)-(.)/(.)/$ /?lang=$1&com=$2$3&param=$4 [PT]
RewriteRule ^/([a-z]{2})/com/(.
)/(.*)/$ /?lang=$1&com=$2&param=$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&param=$5-$6 [PT]
RewriteRule ^/([a-z]{2})/com/(.
)-(.)/(.)-(.)$ /?lang=$1&com=$2$3&param=$4-$5 [PT]
RewriteRule ^/([a-z]{2})/com/(.
)/(.)-(.)$ /?lang=$1&com=$2&param=$3-$4 [PT]

RewriteRule ^/([a-z]{2})/com/(.)-(.)-(.)/(.)$ /?lang=$1&com=$2$3$4&param=$5 [PT]
RewriteRule ^/([a-z]{2})/com/(.)-(.)/(.)$ /?lang=$1&com=$2$3&param=$4 [PT]
RewriteRule ^/([a-z]{2})/com/(.
)/(.*)$ /?lang=$1&com=$2&param=$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]

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

Thanks


#2

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


#3

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


#4

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&param=bla

Alias /classes/ “/root/classes/”

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

php_value auto_prepend_file “\root\app.php”

RewriteEngine On

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


#5

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