Jamie Posted March 26, 2011 Report Share Posted March 26, 2011 Hi guys, I've been trying to get this to work now for a while, so I thought that someone here may be able to help me. I'm trying to make the URL rewrite work so that I can remove index.php from phpVMS. I've already been trying myself so the URL Rewrite function in phpVMS is already set to true, I really would like to be able to remove the index.php so if anyone has done this before and can help me it would be much appreciated. Regards Jamie Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 With out modding all the code i dont think you can, its been hardcoded in. Nabeel will be able to reply better to this. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 With out modding all the code i dont think you can, its been hardcoded in. Nabeel will be able to reply better to this. Yeah I tried that and it gave me the errors. Otherwise I would like to see that in php VMS. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 26, 2011 Administrators Report Share Posted March 26, 2011 There is a rewrite option, you just need to setup the HTACCESS to work properly. I don't have access to an Apache server with phpVMS on it - if someone wants to give me access to mess with it, I can take a look Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 26, 2011 Administrators Report Share Posted March 26, 2011 This ends up need a few changes with how URLs are handled, so it will be available on the next version for sure. I'm testing to see if an updated version of just the CodonRewrite class will help, so you can have it for current releases, at leas, by just updating that file, and an htaccess Everything uses the url() function in bootstrap.php, so the fix ends up being pretty simple, but that doesn't even need changing. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 This ends up need a few changes with how URLs are handled, so it will be avail on the next version for sure. I'm testing to see if an updated version of just the CodonRewrite class will help, so you can have it for current releases, at least Awsome to hear Nabeel. So how is it done? Is it like that....... http://yourva.com/index.php/profile into http://yourva.com/profile Is that right if not, can you clear it up please. Thanks. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 26, 2011 Administrators Report Share Posted March 26, 2011 Yeap, that would be it. Infact, you can test it real quick, see if it works... Place into /core/classes: https://github.com/nshahzad/phpVMS/raw/master/core/classes/CodonRewrite.class.php Then in the root (next to index.php), place in a .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L] See if that works. I can't edit the CodonRewrite file due to a permissions error, and he hasn't gotten back to me yet. 1 Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 Will give a go. Will return shortly. Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 Ok, I got the server internal error when I did it. Nevermind, It works now. But I'm not sure how to test it. What do you want me to run with? Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 I got the error interal server error again. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 26, 2011 Administrators Report Share Posted March 26, 2011 Set the URL_REWRITE setting to true 1 Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 Yep, now it does work. Good Job Nabeel. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 26, 2011 Administrators Report Share Posted March 26, 2011 Can you try this full htaccess: Options +FollowSymLinks Options All -Indexes # Rewrite Rules RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L] <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|tpl)$"> Order Allow,Deny Deny from all </FilesMatch> Try getting to a .tpl file as well THanks Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 Ok, Will return shortly Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 Oh, Mine's the same. It's does work with no problems. # main page of the site DirectoryIndex index.php # prevent viewing of a specific file <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|tpl)$"> Order Allow,Deny Deny from all </FilesMatch> # prevent viewing of index Options -Indexes #Can give without index.php for the modules RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L] Quote Link to comment Share on other sites More sharing options...
Moderators joeri Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 working for me also nice now Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 26, 2011 Administrators Report Share Posted March 26, 2011 thanks guys! Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 No Problem Nabeel, Glad to help out this weekend! Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 Do you need to update that file plus the htaccess? to get this to work? Quote Link to comment Share on other sites More sharing options...
Moderators mark1million Posted March 26, 2011 Moderators Report Share Posted March 26, 2011 No worries i sorted it Nabeel, did you manage to get rid of that fs pax message about no aircraft entered? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 28, 2011 Administrators Report Share Posted March 28, 2011 No worries i sorted it Nabeel, did you manage to get rid of that fs pax message about no aircraft entered? Can you create a bug for that? Otherwise I wont remember. Just a warning to all, there are still some issues with this rewrite thing, I have to sort them out soon Quote Link to comment Share on other sites More sharing options...
Tom Posted March 29, 2011 Report Share Posted March 29, 2011 I'm not sure if this is an issue with the rewrite, but when using actionurl() it just acts as a url() - I went into the actionurl function in whichever file it hides in and removed the if statement, seems to work now. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 29, 2011 Administrators Report Share Posted March 29, 2011 Yeah, that was fixed in the main tree, I forgot to include that in here That's probably why things are broken Quote Link to comment Share on other sites More sharing options...
icaroce Posted February 5, 2013 Report Share Posted February 5, 2013 Sorry to resurrect the post, i have problem with nginx. ^(.*)$ flag: Continue (last) condition: -f /index.php?q=$1 Somebody help-me? Quote Link to comment Share on other sites More sharing options...
Sava Posted February 20, 2013 Report Share Posted February 20, 2013 Managed to do this but I have an issue where the acars map wont work with just /acars but only with /index.php/acars Also the OFC library used for charts and stuff is only working with /index.php/ any help? Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted April 15, 2013 Report Share Posted April 15, 2013 I have the problem that if I switch rewrite on it shows the mainpage without problems but no modules Livemap when click on the links it sends me back to Home any ideas ? Quote Link to comment Share on other sites More sharing options...
zubeek Posted July 13, 2013 Report Share Posted July 13, 2013 Having the same issue as above at the moment - any fixes around? Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted July 17, 2013 Report Share Posted July 17, 2013 ok this gives me the modules too except the Acars map data does not show up any idea help needed! # main page of the site DirectoryIndex index.php # prevent viewing of a specific file <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|tpl)$"> Order Allow,Deny Deny from all </FilesMatch> # prevent viewing of index Options +FollowSymLinks Options All -Indexes #Can give without index.php for the modules RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L] Quote Link to comment Share on other sites More sharing options...
henriquesirot Posted October 4, 2013 Report Share Posted October 4, 2013 I'm having a similar problem... The .htaccess is configured and URL_REWRITE e set to true. I can atually print_r the q= coming from .htaccess, but wherever I click, it only shows the homepage. Quote Link to comment Share on other sites More sharing options...
Felipe Posted November 30, 2013 Report Share Posted November 30, 2013 I'm having a similar problem... The .htaccess is configured and URL_REWRITE e set to true. I can atually print_r the q= coming from .htaccess, but wherever I click, it only shows the homepage. I was having that too. I fixed it by using the CondonRewrite.class.php of David Clark's extended version on Nabeel's full version downloadable here in phpvms.net and this .htaccess. It works 100% for me now. # main page of the site DirectoryIndex index.php # prevent viewing of a specific file <FilesMatch "\.(htaccess|htpasswd|ini|phps|fla|psd|log|sh|tpl)$"> Order Allow,Deny Deny from all </FilesMatch> # prevent viewing of index Options +FollowSymLinks Options All -Indexes #Can give without index.php for the modules RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.