Welcome Guest, Not a member yet? Register   Sign In
mod_rewrite, conditional RewriteBase?
#4

[eluser]cahva[/eluser]
Other way is to define local address for your project and use it as a vhost. That way structure would be the same always and you could have the same .htaccess file without rewritebase.

For example this ps3vs360 project you would define host local.ps3vs360.com and point it 127.0.0.1. After that, add local.ps3vs360.com to your dev server's vhosts.

I use windows as development server with Wamp and heres the steps I make for a new project:

1. Create the directory for the project (D:\web\testproject.com\public_html). I always put code outside of webroot so I create the public_html also on development server(and to have the exact same structure than on production webserver)

2. Open C:\WINDOWS\system32\drivers\etc\hosts
- add line:
127.0.0.1 local.testproject.com

3. Open vhosts file(I have it on C:\wamp\vhosts\vhosts.conf, which is included in the main httpd.conf) and add vhost:

Code:
<VirtualHost *:80>
    DocumentRoot "D:/web/testproject.com/public_html"
    ServerName local.testproject.com
    
    <Directory "D:/web/testproject.com">
        Options Indexes FollowSymLinks Includes ExecCGI
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

Done! Smile


Messages In This Thread
mod_rewrite, conditional RewriteBase? - by El Forum - 12-17-2009, 04:09 PM
mod_rewrite, conditional RewriteBase? - by El Forum - 12-17-2009, 05:14 PM
mod_rewrite, conditional RewriteBase? - by El Forum - 12-17-2009, 05:36 PM
mod_rewrite, conditional RewriteBase? - by El Forum - 12-17-2009, 06:16 PM
mod_rewrite, conditional RewriteBase? - by El Forum - 12-17-2009, 07:23 PM
mod_rewrite, conditional RewriteBase? - by El Forum - 12-18-2009, 05:38 AM



Theme © iAndrew 2016 - Forum software by © MyBB